https://github.com/mdcatapult/py-mongo
Wrapper for pymongo to allow simple instantiation of MongoDB from configuration.
https://github.com/mdcatapult/py-mongo
mongodb python
Last synced: 9 months ago
JSON representation
Wrapper for pymongo to allow simple instantiation of MongoDB from configuration.
- Host: GitHub
- URL: https://github.com/mdcatapult/py-mongo
- Owner: mdcatapult
- License: apache-2.0
- Created: 2022-05-23T09:28:45.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-05-22T13:02:13.000Z (over 1 year ago)
- Last Synced: 2024-09-26T09:19:15.825Z (about 1 year ago)
- Topics: mongodb, python
- Language: Python
- Homepage:
- Size: 78.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Klein Mongo
Module to allow simple instantiation of MongoDB from configuration
See the [config.example.yml](./config.example.yml) for example configuration.
## Python
Uses python 3.7 but should be compatible with later versions.
## Usage
```python
connection = MongoConnection(config)
```
## Development
We use `virtualenv` for local development environments: `pip install virtualenv`.
Once installed, run:
```
virtualenv -p python3.7 venv
source venv/bin/activate
pip install -r requirements.txt
```
Then configure your IDE to use the python interpreter located at `venv/bin/python`.
### Testing
```bash
python -m pytest
```
For test coverage you can run:
```bash
pytest --cov-report term:skip-covered --cov src/ test/
```
### License
This project is licensed under the terms of the Apache 2 license, which can be found in the repository as `LICENSE.txt`