Skip to main content

Matter persistance library.

Project description

matter-persistence

PyPI - Version PyPI - Python Version

Table of Contents

Installation

pip install matter-persistence

Usage

CacheManager and DatabaseManager are the two central objects in matter_persistence.

CacheManager encapsulates a connection pool to Redis, and exposes methods to save, retrieve, and delete values from Redis.

Check usage example for redis CacheManager in examples/redis.

DatabaseManager encapsulates a Sqlalchemy connection pool to a relational database (e.g. Postgresql), and exposes methods to obtain a Connection or a Session.

Furthermore, there is a CustomBase in matter_persistence/sql/base.py, which is a convenient Base class for Sqlalchemy ORM classes. It has an "id" primary key field, which is of type UUID, a "created", "updated" field that is inherited from sqlalchemy_utils' Timestamp, and a "deleted" field, which is of type nullable timezone aware DateTime.

The get and find functions in matter_persistence/sql/utils.py assume a deleted field!

Check usage example for DatabaseManager and some of the utility functions in examples/sql.

Contributing

for contributions, check the CONTRIBUTING.md file

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

matter_persistence-1.9.0-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

Details for the file matter_persistence-1.9.0-py3-none-any.whl.

File metadata

File hashes

Hashes for matter_persistence-1.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 551a2ceb10090bf35df43ecbbf18b1732ef7ba24f2c200a66c5f1a3c4d0d88d8
MD5 b7819daa968d5ff38967bbfaf1af5e37
BLAKE2b-256 4e99643836af3760201c95ad653f3f75aef2057d7a044531b05914218aeb7ad3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page