snakelet
Snakelet is a Schema-less ORM-like system built in pure Python to reduce redundancy with Mongo Native Drivers and Object Management. This package contains a very simple implementation and will need to be expanded upon largely to remain relevant.
documents
Registration only requires exposing the object to the Manager.
from snakelet.storage import Document, Manager
class Cat(Document):
pass
manager = Manager(database='felines')
manager.register(Cat)
managers
Connecting to a database is fairly straightforward.
from snakelet.storage import Manager
manager = Manager(
database='felines',
host='localhost',
port=27017,
username='admin',
password='pass'
)
By default, Managers build and fetch collections in snake case, but this can be switched to camel case during instantiation.
from snakelet.storage import Manager
manager = Manager(
case='camel'
)
Finding, Saving, and Removal are also pretty straightforward.
pye = manager.Cat.find_one({'name': 'pyewacket'})
shoshana = Cat()
shoshana['name'] = 'shoshana'
shoshana['owner'] = 'schrodinger'
manager.save(shoshana)
schrodinger = manager.Cat.find({'owner': 'schrodinger'})
manager.remove(pye)
pagination
This feature set is fairly simple and has normal iterable bindings to ensure simple operation.
for page in manager.Cat.paginate(find={'name': 1}):
for cat in page:
print(cat['name'])
Metadata
Release files for snakelet 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| snakelet-0.5.0.tar.gz | 7.9 kB | Without provenance | Details for snakelet-0.5.0.tar.gz |
Release files / snakelet-0.5.0.tar.gz
| Download URL | snakelet-0.5.0.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
415ce989546278e225deb02f4fcf0e31886131dd61f3d47e387cc7ef3c9194d0
|
|
BLAKE2b-256 checksum How to use checksums |
ef98dfc30b0163c13eecabf0e73410a9ed46234479fad892ae70cb19ba1891e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for snakelet 0.5.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.