DAG in django
Project description
django-dagmodel
DAG in django
Free software: MIT license
Documentation: https://dag.readthedocs.io.
Installation
$ pip install django-dagmodel
or
$ python setup install
Usage
from dag import with_dag_node, with_dag_edge, with_dag
class MyJob(model.Model):
name = models.CharField(max_length=20)
class MyNode(with_dag_node('MyEdge', 'MyDag')):
name = models.CharField(max_length=10, unique=True)
def __str__(self):
return self.name
class MyEdge(with_dag_edge(MyNode)):
def __str__(self):
return f"{self.prev_node} -> {self.next_node}"
def __repr__(self):
return f"{self.prev_node} -> {self.next_node}"
class MyDag(with_dag(MyJob, 'MyEdge')): ...
>>> job = TestJob.objects.create(name='myjob')
>>> dag = MyDag.objects.create(job=job)
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2021-06-12)
First release on PyPI.
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-dagmodel-0.1.0.tar.gz
(7.0 kB
view details)
Built Distribution
File details
Details for the file django-dagmodel-0.1.0.tar.gz
.
File metadata
- Download URL: django-dagmodel-0.1.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 807b5892f11226ba490752395ecafc8428307ddfcd0458714958d5d6103f5d5a |
|
MD5 | 5b3cf4ba74431fc825b031afea5216b5 |
|
BLAKE2b-256 | 7c6b438f7573cf87d89677d14fcfe3cb932dc4329589179d4d2ef928e075cb84 |
File details
Details for the file django_dagmodel-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: django_dagmodel-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 449a44b627d90919be9cb3a0c58bbc8b1c33860198228aa96fa45323016c4bb2 |
|
MD5 | 84fadb42322c43bc380efca8dfe925d8 |
|
BLAKE2b-256 | 69a3174e14310c6f95733d4052fb13e863f8ee91aafe5b22734a980773989274 |