Skip to content

GrozniyToaster/sqlalchmey-privileges

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages