Skip to main content

Coeus Factory - Database Connector Factory

made-with-python PyPI pyversions Maintenance Coverage Awesome Badges

A Database Connector interface that follows a factory model pattern.

Installation

# if using poetry
# highly recommended
poetry add coeusfactory

# also works with standard pip
pip install coeusfactory

Then add necessary database interfaces as necessary. Below are the libraries that works with Coeus Factory.

Database Python Library Status
MongoDB pymongo Passed unit tests
DynamoDB boto3 Needs unit tests

Getting Started

For every first step for any database, initialization and connections will come first. As long as it is supported in the factory, you can pass the parameters you normally handle in supported databse interfaces.

from coeusfactory import ConnectorFactory
cf = ConnectorFactory(
    interface="<database>",
    db="<database-name>"
    # other config or auth params for the db
    username="",
    password=""
)

# db init
cf.handler.initialize()
cf.handler.connect()

Connector Methods

Getting / Creating a model

Users = cf.get_model("Users")
Carts = cf.get_model("Carts")
CustomerReviews = cf.get_model("CustomerReviews")

Retrieval

Users.get_by_id(0)
Users.get({"name": "Test User"})

Insertion

Users.add({"name": "Test User"})

Deletion

Users.delete_by_id(0)
Users.delete({"name": "Test User"})

Modification

Users.update_by_id(0, {"name": "New Name"})
Users.update({"name": "Test User"}, {"name": "New Name"})

Entry Count

Users.count()

Author

Almer Mendoza Ask Me Anything !

ForTheBadge built-with-love forthebadge forthebadge

Metadata

Release files for coeusfactory 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for coeusfactory 0.7.0
File Size Uploaded Provenance
coeusfactory-0.7.0.tar.gz 7.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for coeusfactory 0.7.0
File Interpreter ABI Platform
coeusfactory-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.2 kB

Release files / coeusfactory-0.7.0.tar.gz

Download URL coeusfactory-0.7.0.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
173de1bc3ae89818c8bdf4bd153ddab80cebe08126ab40d205429189e1ba353e
BLAKE2b-256 checksum
How to use checksums
047cbd2fef01e55d8595eb16d4719bdd7a2b390ec4ce2e6923f13953f7095b77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.2 CPython/3.6.8 Darwin/19.3.0

Release files / coeusfactory-0.7.0-py3-none-any.whl

Download URL coeusfactory-0.7.0-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e3a9ce7525a6ed8e9d42a735637aebaeb7b4bfc35f0e1fa5f69ccb1ed3de63e
BLAKE2b-256 checksum
How to use checksums
c9c5cb393f3a8ca3502fc7dde5b661fb97eb071fdf74842113385faf04212b96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.2 CPython/3.6.8 Darwin/19.3.0

Security for coeusfactory 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page