Skip to main content

mongo_pickle

Schema-less Pythonic Mongo ORM.

Designed to allow quick prototyping when developing and designing systems.

Exposes an interface to store and query generic python objects from and to Mongo databases without the need to declare schemas when creating an initial DAL.

Usage:

Assuming you have some business logic that creates event data:

from mongo_pickle.collection import CollectionConfig
from mongo_pickle.model import Model

from datetime import datetime

class EventsConfig(CollectionConfig):
    host = 'sample.mlab.com'
    port = 27017

    database = 'database_name'
    collection = "events_v1"
    username = ''
    password = ''


class Event(Model):
    COLLECTION = EventsConfig.get_collection() # Shortcut to get pymongo collection

    def __init__(self, title, description, event_time):
        super(Event, self).__init__()
        self.title = title
        self.description = description
        self.event_time = event_time


if __name___ == '__main__':
    python_event = Event('cool event', 'code generated output', datetime.now())

    # Stored to your collection
    python_event.save()

    # Retrieve data
    all_events = Event.load_objects()

    # Supports mongo query filters
    all_events = Event.load_objects({'title': 'cool_event')

Release files for mongo-pickle 0.1.6

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

Source distribution (sdist)

Source distribution for mongo-pickle 0.1.6
File Size Uploaded
mongo_pickle-0.1.6.zip 9.9 kB Details

Release files / mongo_pickle-0.1.6.zip

Download URL mongo_pickle-0.1.6.zip
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
08d771023ddf11b026ccc5d0896587bcc3a0529ad6a0a6c04e6fd4f43e4c6cfe
BLAKE2b-256 checksum
How to use checksums
b8d35f6c1ddcacc0a9cc744b046f921179fd6b1f8b52311ff6b32d3511f1de59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.6.2

Release history Release notifications | RSS feed

This release

0.1.6 This release

1 release file

0.1.5

2 release files

0.1.4

1 release file

0.1.2

1 release file

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