Catalog PyPI
Back to packageRELEASE DETAILS

0.3.3

PyPI

age-simple-sql

A simple SQL wrapper for Apache AGE using psycopg2 connection pooling.

Published21 Aug 2024
Direct dependencies1
Transitive dependenciesNot calculated

README

Version 0.3.3 documentation

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

License

Apache-2.0 License

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 1

Native requirements
1 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
psycopg2-binary
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "",
  "evaluation": "NOT_EVALUATED"
}
psycopg2-binaryruntime

Distribution files

2 collected
age_simple_sql-0.3.3-py3-none-any.whl

bdist_wheel · 10.18 KB · Python py3

Source file
age_simple_sql-0.3.3.tar.gz

sdist · 10.36 KB · Python source

Source file

Repository

PENDING
matheusfarias03/agesimplesql

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 09:01 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:fbac82dfc9a5459541f41b1a12a426ea0d3f8b4654ee1038ce4ef038e8f505ec

Other collected versions

View all collected versions →