Skip to main content

Python MongoDB Content Store

Python Store Implementation for Content in MongoDB

Usage

from frappymongocontent import ContentStore

MONGO_URL = "mongodb://localhost:27017"
content_store = ContentStore(mongo_url=MONGO_URL, mongo_db="myDatabase", collection_name="content")
content_list = content_store.find_by_reference("my-demo")
for item in content_list:
    print(item.content, "is a dictionary with all the content")

Methods

Base methods provided by pbu

  • find_by_reference(references) - retrieves content associated with the provided reference ID (e.g. demo1). This maps to the references declared by the embedding of the frontend module @frappy/react-content
  • find_by_reference_and_content_type(references, content_type) - similar to find_by_reference, this additionally filters by content type as well. Content types are also declared by the embedding of the frontend module.
  • update_content(content_id, label, references, content) - this is a complete update of the data (except for the content type, which shouldn't change with regular updates). This will completely replace a content objects label, reference assignment and the entire content (provided as list or dict, depending on the type of content (declared in the embedding of the frontend module)

Release files for frappymongocontent 1.0.1

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

Source distribution (sdist)

Source distribution for frappymongocontent 1.0.1
File Size Uploaded
frappymongocontent-1.0.1.tar.gz 2.4 kB Details

Built distribution (wheel)

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

Total release size: 9.4 kB

Release files / frappymongocontent-1.0.1.tar.gz

Download URL frappymongocontent-1.0.1.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
14f6167b8890a2b7a65f1956f6f5c8ec4524d41c7391ddd01807e75f3eff46e7
BLAKE2b-256 checksum
How to use checksums
aa3d8f1ab9c5067d85feeed76de2147ac7ebf22467704642ae492fbb0e0df47c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.12

Release files / frappymongocontent-1.0.1-py3-none-any.whl

Download URL frappymongocontent-1.0.1-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
39e7dcc5141da6b9b76b44786b09255badc0cf1afbab41f4ff493e718f6d1a03
BLAKE2b-256 checksum
How to use checksums
2293a0788e3c1669820882e9449fa91138a76ee81f62d4d5f423f2c0e531b45a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.12

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

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