FASva MySQL-ORM
This project contains a Object-relational mapping (ORM) that is used to access the MySQL/MariaDB used within the research project FASva using SQLAlchemy.
Installation
You can find the latest version on PyPi.
$ pip install fasvaorm
Usage
Utilizing fasvaorm for accessing the database is quite straightforward. Each available table is represented as a class in the fasvaorm.models module. Here is an example on how to initialize and query the database.
from fasvaorm import init_engine, get_session
from fasvaorm.models import Drive
# initialize the engine. Will also try to create the database if it does not exist.
engine = init_engine("mysql+pymysql://{user}@{host}:{port}/{database}".format(**dict(user='root', host='localhost',
port=3306,
database='database')))
# now get a session
session = get_session()
# and use that session to query all available drives
for d in session.query(Drive).all():
print(d.name)
# use can also access all records of that drive
for r in d.records:
print(r.filepath)
# or the vehicle
print(d.vehicle.serial_number)
# or also all scenes of that drive
for a in d.aggregations:
print(a.timestamp)
For further examples on how to use fasvaorm see the tests package.
Metadata
Release files for fasvaorm 0.8.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fasvaorm-0.8.3-py3-none-any.whl | Python 3 | none | any | Details for fasvaorm-0.8.3-py3-none-any.whl |
Release files / fasvaorm-0.8.3-py3-none-any.whl
| Download URL | fasvaorm-0.8.3-py3-none-any.whl |
|---|---|
| Size | 36.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
36e108387cd2647b5621698b6baf4c8a66d6e92b5f8186febb38940bee859402
|
|
BLAKE2b-256 checksum How to use checksums |
733b0e8cad5597a47218b845097e29e732c6bf5a429b91e64fbe6d9e81717eab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.5.7
|
Security for fasvaorm 0.8.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.