AGESimpleSQL
AGESimpleSQL is a simple SQL wrapper for Apache AGE using psycopg2 connection pooling. It supports operations such as creating and dropping graphs, creating vertex and edge labels, creating vertices and edges, retrieving graph and label information, and executing SQL and Cypher queries. It is not the official driver for Apache AGE.
Apache AGE is a PostgreSQL extension that provides graph database functionality. The goal of the Apache AGE project is to create single storage that can handle both relational and graph model data so that users can use standard ANSI SQL along with openCypher, the Graph query language.
Usage
from age_simple_sql import AGESimpleSQL
from age_simple_sql.models import Vertex
# Initialize the AGESimpleSQL instance
db = AGESimpleSQL(
user="your_db_user",
password="your_db_password",
host="your_db_host",
port=your_db_port,
dbname="your_db_name",
logfile="path/to/your/logfile.log"
)
# Call setup to load the AGE extension commands
db.setup()
# Example usage
db.create_graph("TestGraph")
db.create_vertex_label("TestGraph", "Book")
book = Vertex(label="Book", properties={"Title": "The Hobbit"})
db.create_vertex("TestGraph", vertex)
author = Vertex(label="Author", properties={"Name": "J.R.R.Tolkien"})
wrote = Edge(label="WROTE", from_vertex=author, to_vertex=book)
db.create_edge("TestGraph", wrote)
Testing
This repo contains the tests folder, which includes a bash script, a python script, and the log file of the test. Executing the bash script will pull the apache/age docker image and run it on the background. Then, it is going to call the python test script and execute it. Finally, it stops and removes the container.
Contributing
Contributions are welcome! Please submit a pull request or open an issue to discuss what you would like to change.
For more information about Apache AGE
- Apache Age Website: https://age.apache.org/
- Github: https://github.com/apache/age
- Documentation: https://age.apache.org/age-manual/master/index.html
License
Metadata
Release files for age-simple-sql 0.3.3
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 | |
|---|---|---|---|---|
| age_simple_sql-0.3.3.tar.gz | 10.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| age_simple_sql-0.3.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.0 kB
Release files / age_simple_sql-0.3.3.tar.gz
| Download URL | age_simple_sql-0.3.3.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b62086e6e646bb289b5290763463f070a0ba09b4391e4b2c8a1869ff99944b6
|
|
BLAKE2b-256 checksum How to use checksums |
3b2d2a7e4f37bb411ef198b016d8337c644b26ea0dc67daf8367df6d82f1c4fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|
Release files / age_simple_sql-0.3.3-py3-none-any.whl
| Download URL | age_simple_sql-0.3.3-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e2d62e0720461872fb62ea2089517cd1a2e6d2176b115b328bae30b6af4579b
|
|
BLAKE2b-256 checksum How to use checksums |
fb4d6a6b9a32787190722b29c0ed8b3148a6707a8f3d0e75c3e43ccef7952dee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|
Security for age-simple-sql 0.3.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.