Skip to main content

PyNOSQL Library for Python

Build Status

Summary

PyNOSQL is a simple library that wraps two popular NOSQL databases DynamoDB|MongoDB and provides the concept of a model for maintaining, expanding, and reducing data structures stored in NOSQL tables. Extend model.Model and pass to various Dynamo operations to benefit from default values, adding/removing elements, and simplifying use of boto3 with DynamoDB.

Versions

0.0.1 - Support for basic CRUD operations in DynamoDB 0.0.2 - Support for basic update of model with GET|PUT 0.0.3 - Support for NotFound on single record and empty list for multiple records

Getting Started

  1. Instantiate a client and pass to the desired provider:

    
    from pynosql.credentials.aws import AWSCredentials
    from pynosql.clients.aws import AWSClient
    from pynosql.providers.dynamo import DynamoDBProvider
    
    credentials = AWSCredentials(
        'AKIAIOSFODNN7EXAMPLE',
        'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY'
    )
    
    dynamo = DynamoDBProvider(
        AWSClient(self.credentials, 'us-west-2')
    )
    
    
  2. Extend base.model.Model to create the desired data structure to be stored in your NOSQL DB:

    
    from pynosql.base.model import Model
    
    class TestModel(Model):
    
        BASE = {
            'test1': None,
            'test2': None,
            'test3': None,
            'test4': None
        }
    
        def __init__(self):
            super(TestModel, self).__init__(self.BASE)
    
    
  3. Pass the model with the appropriate call to DynamoDB:

    
    key = {
        'test1': 'value1',
        'test2': 'value2'
    }
    
    response = dynamo.get_record(TestModel(), 'TestTable', Key=key)
    
    
  4. For paginating all results into the model, just keep passing the model instance into your DynamoDB calls. The new records will be appended to the list within the model.

Release files for pynosql 0.0.4

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

Source distribution (sdist)

Source distribution for pynosql 0.0.4
File Size Uploaded
pynosql-0.0.4.tar.gz 8.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pynosql 0.0.4
File Interpreter ABI Platform
pynosql-0.0.4-py3-none-any.whl Python 3 none any Details
pynosql-0.0.4-py2.7.egg Legacy Egg format - - Details
pynosql-0.0.4-py2-none-any.whl Python 2 none any Details

Total release size: 73.9 kB

Release files / pynosql-0.0.4.tar.gz

Download URL pynosql-0.0.4.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a1108584211610f4026530f482b10ccf1870d71c0754324fb4276788f59108ab
BLAKE2b-256 checksum
How to use checksums
25da5e77e07d6515af28a79caf2b64e9e6cecd7b4e6177f3c92a4a41811b1dbe
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/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.2

Release files / pynosql-0.0.4-py3-none-any.whl

Download URL pynosql-0.0.4-py3-none-any.whl
Size 15.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5de624de12d084ff0bfb3c85be47209e131bb966d74992ef04c438a00476490f
BLAKE2b-256 checksum
How to use checksums
d6817f25529c9dc5b43f60abcebf00e94b58e5af3f6e0532c7e9c6d03f6f0e1a
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/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.2

Release files / pynosql-0.0.4-py2.7.egg

Download URL pynosql-0.0.4-py2.7.egg
Size 34.2 kB
Tags Egg
SHA-256 checksum
How to use checksums
5dade84ddf66b1c4024df73e726e4c781c221a4b4fe6123e99959572998df751
BLAKE2b-256 checksum
How to use checksums
7ce24c93b3f82bdd8be6999572c33284eabbcaf88bf46fe06ac13b7e2b377246
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/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.2

Release files / pynosql-0.0.4-py2-none-any.whl

Download URL pynosql-0.0.4-py2-none-any.whl
Size 15.5 kB
Tags Python 2
SHA-256 checksum
How to use checksums
0de3f09638b961357b2360595f19fd39d44afb5dc89cf562e72962560822606e
BLAKE2b-256 checksum
How to use checksums
d688cee84b093d65254a0a33ce626052825a3f0e7740790eb1c5811eb616fc38
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/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.2

Release history Release notifications | RSS feed

This release

0.0.4 This release

4 release files

0.0.3

3 release files

0.0.2

3 release files

0.0.1

3 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