Skip to content

mikeland73/graphpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

graphpy

Python graph DB ORM

graphpy is a migration free plug and play ORM for any Python project. It was inspired by the graph db module from graphp. It allows you to build quick and dirty db based models using a graph abstraction on top of MySQL.

A simple example:

Define nodes (your model) with minimum boilerplate

class User(GPNode):
    node_data = {
        'name': '',
        'last_name': '',
    }
# Use the model:
me = User(last_name='Doe')
me.set_name('Mike')
me.get_name()         # Mike
me.get_last_name()    # Doe
try:
    me.get_foo()      # throws exception
except: 
    me.get('foo')     # this is fine, returns None
me.set('foo', 'bar')  # it's fine to use non-declared data
me.get('foo')         # bar
me.save()
# retrieve it from db:
me = User.get_by_id(123)

Edges

todo

Indexed data

todo

graphpy is a work in progress

About

Python graph DB ORM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages