Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

matter-persistence

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

matter-persistence

Matter persistance library.

  • 1.7.0
  • Source
  • PyPI
  • Socket score

Maintainers
1

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

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc