Flamyngo is a customizable Flask frontend for MongoDB.
Project description
# Flamyngo
Flamyngo is a customizable Flask frontend for MongoDB.
At the most basic level, the aim is to delegate most settings to a YAML
configuration file, which then allows the underlying code to be reused for
any conceivable collection. Querying and display is restricted to a single
collection for now. However, the code can serve as a starting point for more
complex setups to support multiple collections.
# Usage
Clone or download the code. Install it if you wish.
In the root directory, run:
```bash
python scripts/flm --config <path/to/config.yaml>
```
If `--config` is not provided, it defaults to `$HOME/.flamyngo.yaml`.
# Configuration
A sample commented configuration yaml file is given below.
```yaml
# MongoDB settings
db:
host: mongo.host.com
port: 27017
username: user
password: password
database: mydb
collections:
-
name: mycoll
# These set the special queries as an ordered list of [<key>, <regex string>, <type>].
# If the query string satisfies any of the regex, the Mongo query is set as
# {<key>: type(<search_string>)}. This allows for much more friendly setups for common
# queries that do not require a user to type in verbose Mongo criteria. Each
# regex should be uniquely identifying.
# Supported types include int, float, str, objectid.
# If none of the regex works, the criteria is interpreted as a Mongo-like dict query.
query:
- [last_name, '^[A-Za-z]+$', str]
- [phone_number, '^[0-9]+$', int]
# A default list of projections to display as a table. Only keys in the root of
# the document is supported right now.
summary:
- _id
- first_name
- last_name
- phone_number
# The following defines unique identifiers for each doc. This allows each
# specific doc to be queried and displayed using this key. If this key is
# present in the default list of projections, a link will be created to each
# unique document.
unique_key: _id
unique_key_type: bson.objectid.ObjectId
```
Flamyngo is a customizable Flask frontend for MongoDB.
At the most basic level, the aim is to delegate most settings to a YAML
configuration file, which then allows the underlying code to be reused for
any conceivable collection. Querying and display is restricted to a single
collection for now. However, the code can serve as a starting point for more
complex setups to support multiple collections.
# Usage
Clone or download the code. Install it if you wish.
In the root directory, run:
```bash
python scripts/flm --config <path/to/config.yaml>
```
If `--config` is not provided, it defaults to `$HOME/.flamyngo.yaml`.
# Configuration
A sample commented configuration yaml file is given below.
```yaml
# MongoDB settings
db:
host: mongo.host.com
port: 27017
username: user
password: password
database: mydb
collections:
-
name: mycoll
# These set the special queries as an ordered list of [<key>, <regex string>, <type>].
# If the query string satisfies any of the regex, the Mongo query is set as
# {<key>: type(<search_string>)}. This allows for much more friendly setups for common
# queries that do not require a user to type in verbose Mongo criteria. Each
# regex should be uniquely identifying.
# Supported types include int, float, str, objectid.
# If none of the regex works, the criteria is interpreted as a Mongo-like dict query.
query:
- [last_name, '^[A-Za-z]+$', str]
- [phone_number, '^[0-9]+$', int]
# A default list of projections to display as a table. Only keys in the root of
# the document is supported right now.
summary:
- _id
- first_name
- last_name
- phone_number
# The following defines unique identifiers for each doc. This allows each
# specific doc to be queried and displayed using this key. If this key is
# present in the default list of projections, a link will be created to each
# unique document.
unique_key: _id
unique_key_type: bson.objectid.ObjectId
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
flamyngo-0.1.0.tar.gz
(12.8 kB
view details)
Built Distribution
flamyngo-0.1.0-py27-none-any.whl
(15.0 kB
view details)
File details
Details for the file flamyngo-0.1.0.tar.gz
.
File metadata
- Download URL: flamyngo-0.1.0.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57ff089db3dd057e633ca3dea7e0a77520f6048612db953fa88891458a9eb824 |
|
MD5 | 39749deb2ca1de1e0c8445140efd5272 |
|
BLAKE2b-256 | c22facbe1f635be080bc5ea183591b8b71bea13f2ff03db1d7de4696b040ead4 |
File details
Details for the file flamyngo-0.1.0-py27-none-any.whl
.
File metadata
- Download URL: flamyngo-0.1.0-py27-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 2.7
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05cd33b08eb17d89a1428fe0e3ceb629cfe664f0ef22a57700545b337081d50b |
|
MD5 | 70dcfd71594903873b7c3fb16c0c495d |
|
BLAKE2b-256 | 6982a7752d880d0e8036aead84a7dbc1b6f2d0c750823eb2344d540ddf6c1e52 |