A Python package for the Virgo language
Project description
PyVirgo
This is a Python implementation of Virgo, the graph declarative language.
You can find details of Virgo with the Go implementation at https://github.com/r2d4/virgo
Virgo is designed so that we can express graphs in a config file. These could be dependency graphs, for example of a build process, or any other graph structure.
To invoke PyVirgo:
import virgo g = virgo.loads("a -> b, c <- d") g # doctest: +ELLIPSIS <virgo.graph.Graph object at ...> sorted(list(g.direct_successors_of("a"))) ['b', 'c']
It's more likely that we will want to load a graph from a file:
g2 = virgo.load("test/files/make.vgo") g2 # doctest: +ELLIPSIS <virgo.graph.Graph object at ...> g2.direct_successors_of("src files") {'test'}
We can access the 'node data' for each node, by identifier.
g2.nodes["src files"] 'go build ./...'
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
Built Distribution
File details
Details for the file pyvirgo-0.2.0.tar.gz
.
File metadata
- Download URL: pyvirgo-0.2.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.7.3 Linux/5.4.72-v7+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 508afc0a964331ab877d8fcce88fe81348a3137f8e8fbc4bc27c96c9faa9ab48 |
|
MD5 | b79eba3b56d21ddd6fa96f7757e73e4c |
|
BLAKE2b-256 | bebdc02f3cb2a90fa49610bbec40a9ca9dfc8e44a9ff6f42b48529e86bc45ccc |
File details
Details for the file pyvirgo-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: pyvirgo-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.7.3 Linux/5.4.72-v7+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0c2dada2b37622362374b581749e2eeedb9d8116848fa45a5040faa2b2e2215 |
|
MD5 | 608bab548490997ae558e95b1e1e370b |
|
BLAKE2b-256 | a49c9fc36eb0ca4f70f1a1f5b7dc1cfa35c7dc3a8eac71ae294478b14c197829 |