Skip to main content

module provide manipulation with privileges with sqlalchemy

Project description

Privileges manipulation with SQLalchemy

Add grant/revoke privileges construct

Usage

Examples:

>>> from sqlalchemy import *
>>> from sqlalchemy_privileges import *

>>> str(GrantPrivileges('insert', Table('a', MetaData(schema='schema')), 'my.name'))
'GRANT INSERT ON schema.a TO "my.name"\n'

>>> str(RevokePrivileges(['insert', 'update'], table('a'), ['my.name', 'my.friend']))
'REVOKE INSERT, UPDATE ON a TO "my.name", "my.friend"\n'

>>> str(GrantPrivileges('all', table('a'), ['my.name', 'my.friend']))
'GRANT ALL ON a TO "my.name", "my.friend"\n'

Installation

sqlalchemy-privileges is available on PyPI and can be installed via pip

pip install sqlalchemy-privileges

Acknowledgements

Package inspired by sqlalchemy-views

And thank you to the various contributors!

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

sqlalchemy_privileges-0.2.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

sqlalchemy_privileges-0.2.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file sqlalchemy_privileges-0.2.0.tar.gz.

File metadata

  • Download URL: sqlalchemy_privileges-0.2.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.10.6 Linux/5.15.0-1031-azure

File hashes

Hashes for sqlalchemy_privileges-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3154d0a85675002403fbe75aa360c96ddbd0f2ca5fc1eb37206d8f7cc0a93322
MD5 fb693e938f935e18194c966da4102d23
BLAKE2b-256 95503f0542aeb630f056e86cc196b1ff4295f2b495527256ab2d66adcd02a97b

See more details on using hashes here.

File details

Details for the file sqlalchemy_privileges-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sqlalchemy_privileges-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f7074f816cefb70b71571b7cb4a6abe7f40b4ff63974f013e61b50fdb12842ee
MD5 9faee6088425e2486ad07a4f138d01b6
BLAKE2b-256 9321b8a43df678b53de20079e0149e1fb382e2d3896f76b6f0e50f89369c172f

See more details on using hashes here.

Supported by

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