forked from Doist/redis_graph
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·77 lines (56 loc) · 2.07 KB
/
Copy pathsetup.py
File metadata and controls
executable file
·77 lines (56 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/usr/bin/env python
# Copyright (c) 2007 Qtrac Ltd. All rights reserved.
# This module is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
import os
from setuptools import setup
setup(name='redis_graph',
version = '1.0',
author="amix",
author_email="amix@amix.dk",
url="http://www.amix.dk/",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries :: Python Modules",
],
packages=['redis_graph', 'test'],
platforms=["Any"],
license="BSD",
keywords='redis graph database',
description="Python graph database implemented on top of Redis.",
long_description="""\
redis_graph
---------------
redis_graph implements a graph database on top of Redis.
Requires:
* Redis 2.0+
* Newest version of redis-py http://github.com/andymccurdy/redis-py
* redis_wrap http://pypi.python.org/pypi/redis_wrap
Related:
* Blog post about redis_graph: http://amix.dk/blog/post/19592#redis-graph-Graph-database-for-Python
Examples
----------
Example of creating edges between nodes::
from redis_graph import *
add_edge(from_node='frodo', to_node='gandalf')
assert has_edge(from_node='frodo',
to_node='gandalf') == True
assert list(neighbors('frodo')) == ['gandalf']
delete_edge(from_node='frodo',
to_node='gandalf')
assert has_edge(from_node='frodo',
to_node='gandalf') == False
Example of node and edge values::
from redis_graph import *
set_node_value('frodo', '1')
assert get_node_value('frodo') == '1'
set_edge_value('frodo_baggins', '2')
assert get_edge_value('frodo_baggins') == '2'
Copyright: 2010 by amix
License: BSD.""")