
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
A data modeling MongoDB library for Python
pip install mongodb-data-layer
Note: It is better to create a python virtual environment...
Setup an environment variables:
MONGO_DB_URL="mongodb://localhost:27020" # The default mongodb localhost but you can also put a connection string from atlas server.
MONGO_DB_NAME="my_database" # Your created database
To create a model you can simply enter this command on a command promt:
generate-model /models/test_model.py # where '/models/test_model.py' is your file path and file name
#A MongoDB model for the tests collection
from mongodb_data_layer.base import BaseMongoModel
class Test(BaseMongoModel):
collection_name = 'tests' # Create a collection with this name in the database
This library is very useful to lessen the configuration for mongodb database.
This package is build on top of MongoDB official package/drivers.
This is also works well in fastapi.
This library is currently in development. Feel free to contribute.
Official repository: https://github.com/nojram00/mongodb-data-layer
FAQs
A data layer for mongodb
We found that mongodb-data-layer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.