Skip to main content

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

  1. Add "urlid_graph" to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [
    ...
    "urlid_graph",
]
  1. 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"]
  1. Configure Django caching system (used to store ElementConfig labels):
CACHES = {
    "default": {
        "BACKEND": "django.core.cache.backends.locmem.LocMemCache",
        "TIMEOUT": 24 * 3600,
        "MAX_ENTRIES": 1024,
    }
}
  1. Include the urlid_graph URLconf in your project's urls.py like this:
    path('v1/', include("urlid_graph.urls")),
  1. Run python manage.py migrate to create the needed models, triggers etc.

  2. Populate the database:

# you may want to add entities to urlid_graph_entity model
python manage.py import_config data/config.csv  # must create this file before
python manage.py import_config data/config.csv  # must create this file before
python manage.py import_objects appname Model file.csv.xz  # must create model
python manage.py import_relationships relname file.csv.xz

Importing data

python manage.py import_objects appname Model file.csv[.gz|.xz]
python manage.py import_relationship relname file.csv[.gz|.xz]

Metadata

Release files for django-urlid-graph 0.5.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-urlid-graph 0.5.11
File Size Uploaded
django_urlid_graph-0.5.11.tar.gz 33.4 kB Details

Release files / django_urlid_graph-0.5.11.tar.gz

Download URL django_urlid_graph-0.5.11.tar.gz
Size 33.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2a40cf67b0627772de8d215f6655b95ea5f2b64cd781f0ffe6fd2cf67b7600e1
BLAKE2b-256 checksum
How to use checksums
54e517b3134c9b7c449b8db31333298b25e88c9948554d45610a911a8d6a7f2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.5

Release history Release notifications | RSS feed

This release

0.5.11 This release

1 release file

0.5.10

1 release file

0.5.9

1 release file

0.5.8

1 release file

0.5.7

1 release file

0.5.6

1 release file

0.5.5

1 release file

0.5.4

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.12

1 release file

0.1.11

1 release file

0.1.10

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page