A postgres database adapter for the minumtium library.
Project description
Minumtium Postgres
A postgres database adapter for the minumtium library. It uses SQL Alchemy as its abstraction library alongside with pg8000 as the connection driver.
What can I use it for?
It is used to provide access to data stored in postgres instances using the minumtium library.
Usage
Install it using your favorite package manager:
pip install minumtium-postgres
pipenv install minumtium-postgres
poetry install minumtium-postgres
Then, provide it to your minumtium Services:
from minumtium.modules.idm import IdmService, UserRepository
from minumtium_simple_jwt_auth import SimpleJwtAuthentication
from minumtium_postgres import MinumtiumPostgresAdapter, MinumtiumPostgresAdapterConfig
config = MinumtiumPostgresAdapterConfig(
username='minumtium',
password='samplepassword',
host='localhost',
port=5432,
dbname='minumtium',
schema_name='minumtium')
db_adapter = SqlAlchemyAdapter({config, 'posts')
auth_adapter = SimpleJwtAuthentication(configuration={
'jwt_key': 'not a reliable key, change that quickly',
'session_duration_hours': 1})
users_repository = UserRepository(db_adapter)
idm_service = IdmService(auth_adapter, users_repository)
idm_service.authenticate('jao', 'batata')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file minumtium_postgres-1.2.3.tar.gz.
File metadata
- Download URL: minumtium_postgres-1.2.3.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb36654f78ba0dc86d2f56cef0da329dea81a54968410f7bae5e5b0c82cc887f
|
|
| MD5 |
86c5043b00f79cef175e8b7009d6b040
|
|
| BLAKE2b-256 |
e1e6dc686ab93a5aeb1002d6b38ca4301c4ebb69e822608cc73f2ffa9c6b0633
|
File details
Details for the file minumtium_postgres-1.2.3-py3-none-any.whl.
File metadata
- Download URL: minumtium_postgres-1.2.3-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fc24620420268a0e2aac8c9ce8aca2c092689174a24731b2ee9de2ae3c442de
|
|
| MD5 |
79e902046b82f5122e8865f7115335e0
|
|
| BLAKE2b-256 |
3cbef8c590d75aa449dc87cded76363e54a9dd36d600cff2ec51c0e3c4d0ba27
|