Django-based API to serve URLid + graph database
Project description
django-urlid-graph
Django-based API to serve URLid + graph database.
This repository hosts the app code and also a project structure so it's easier
to develop - only the urlid_graph
folder is packaged before going to
PyPI.
Installation and configuration
- Add "urlid_graph" to your
INSTALLED_APPS
setting like this:
INSTALLED_APPS = [
...
"urlid_graph",
]
- Change database configurations (this example uses python-decouple):
DATABASE_URL = config("DATABASE_URL") # must be set
GRAPH_DATABASE_URL = config("GRAPH_DATABASE_URL") # must be set
graph_config = config("GRAPH_DATABASE_URL", cast=db_url)
GRAPH_DATABASE = graph_config["NAME"] # must be set
DATABASES = {
"default": config("DATABASE_URL", cast=db_url),
GRAPH_DATABASE: graph_config, # must set this way
}
DATABASE_ROUTERS = ["urlid_graph.db_router.RelationAndGraphDBRouter"]
- Include the
urlid_graph
URLconf in your project'surls.py
like this:
path('v1/', include("urlid_graph.urls")),
-
Run
python manage.py migrate
to create the needed models, triggers etc. -
Populate the database:
python manage.py create_brasilio_entities
python manage.py import_config data/config.csv # must create this file before
python manage.py import_data data/graph-data/ # must have this folder with data
python manage.py remove_duplicates
python manage.py update_search_data
Done! :)
Importing data
(docs to be done)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-urlid-graph-0.1.10.tar.gz
(24.8 kB
view hashes)
Close
Hashes for django-urlid-graph-0.1.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d929141053a6b0584a28da66a257e1653737d009480217c54cf26aec7c58230d |
|
MD5 | 9ca2a667ff8549f7e18b0b99ae345040 |
|
BLAKE2b-256 | 8ee9762361232011aa146cd38ac478a955745a5f8504760f907805f63b920f34 |