Golla
- A SQL Query free ORM
- Support SQLAlchemy ORM
Create Connection
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
host = 'localhost'
user = 'postgres'
password = 'root'
data_base = 'postgres'
port = '5432'
URL = 'postgresql://{}:{}@{}:{}/{}'
URL = URL.format(user, password, host, port, data_base)
ds_schema = 'public'
engine = create_engine(URL, encoding='utf8')
engine.connect()
Connection = sessionmaker(bind=engine)()
Create Model class
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Integer, String, Column
from golla.table import BaseChild
Base = declarative_base()
BaseChild.Connection = Connection
class Employee(Base, BaseChild):
__tablename__ = "employee"
EMPID = Column("emp_id", Integer, primary_key=True)
NAME = Column("NAME", String)
Age = Column("Age", Integer)
Save object into DB
e = Employee()
e.EMPID = 203
e.Age = 20
e.NAME = "b"
Employee.save(e)
Get records from table by id
emp = Employee().get_by_id(EMPID=100)
Get all records
emps = Employee().get_all()
Delete records from table by id
Employee().delete_by_id(EMPID=201)
MIT License : Copyright (c) 2019 Abhimanyu Haralukallu
Metadata
Release files for Golla 0.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Golla-0.0.0.tar.gz | 2.2 kB | Without provenance | Details for Golla-0.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| Golla-0.0.0-py3-none-any.whl | Python 3 | none | any | Details for Golla-0.0.0-py3-none-any.whl |
Total release size: 4.7 kB
Release files / Golla-0.0.0.tar.gz
| Download URL | Golla-0.0.0.tar.gz |
|---|---|
| Size | 2.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
500a8c9ceaeedff02b2505c94a3b183498491e0e817fe8415633443fbb91bb3d
|
|
BLAKE2b-256 checksum How to use checksums |
849c8a0d909d24f011f8564aaf0ab698127e321e893548fe9ed7ef06d72f27c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.19.1 CPython/3.7.2
|
Release files / Golla-0.0.0-py3-none-any.whl
| Download URL | Golla-0.0.0-py3-none-any.whl |
|---|---|
| Size | 2.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aaf2e1c728aafdae2f4811204adc19200031d5975e2152f0a0912a13d0a7d3ee
|
|
BLAKE2b-256 checksum How to use checksums |
86470a69a008c80d24edc3baf6719d64c3477007f37a9f3fed0c118d53f76753
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.19.1 CPython/3.7.2
|
Security for Golla 0.0.0
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.