Integrate Sharepoint and SQL Alchemy
Project description
netlink-sharepoint-alchemy
Integration of Sharepoint and SQL Alchemy
Use the pre-configured Base for Tables that reflect a Sharepoint list, and the ready-made
ORM mapped User
to access the users of the Sharepoint.
from netlink.sharepoint.alchemy import Base, User
id
is part of Base
.
Define a mapped list / table like this:
from netlink.sharepoint.alchemy import Base
from sqlalchemy import Column
from sqlalchemy import String
from netlink.alchemy import UnsignedInteger
class Action(Base):
__tablename__ = 'action'
_sharepoint_list_title = "Action"
# fmt: off
action = Column(String, nullable=False, doc='Title')
deadline = Column(UnsignedInteger, nullable=True, doc='Deadline')
comment = Column(String, nullable=True, doc='Comment')
# fmt: on
Load data from Sharepoint (non-working, concept only)
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from netlink.sharepoint.base import Site
from netlink.sharepoint.alchemy import Base, User
class ActionControl(Base):
pass
if __name__ == '__main__':
engine = create_engine(f"sqlite+pysqlite:///test.sqlite3", future=True)
Base.metadata.create_all(engine)
sharepoint = Site()
session = Session(engine)
User.bind_to_sharepoint(sharepoint)
User.load_from_sharepoint_list(session)
ActionControl.bind_to_sharepoint(sharepoint)
ActionControl.load_from_sharepoint_list(session)
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
Close
Hashes for netlink-sharepoint-alchemy-0.0.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 059a984dc6a9fec5e36342961098ac749a85f354ffd5e528076b999b55b69b77 |
|
MD5 | 2cdd2dfd6881f1039466f02119fa2bf9 |
|
BLAKE2b-256 | 519e9656ad2633ce201ecf30ee7a5b1a60bb8f7d78e75ce976af48a8129fd5ad |
Close
Hashes for netlink_sharepoint_alchemy-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d103dbaf26ba3125bf3eedfdf5136a4c875b75fd842d7baf32f112f880b44cf7 |
|
MD5 | 6b2a6f3a8c32710238643e3c2d89932e |
|
BLAKE2b-256 | 6261f9b8ca99d57c850b49b07a77125f5e26125779b4b13662bec25c0ce0c99b |