Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyvirgo36-0.2.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyvirgo36-0.2.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file pyvirgo36-0.2.0.tar.gz.

File metadata

  • Download URL: pyvirgo36-0.2.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for pyvirgo36-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b601d58bffc4c40991f7731604a17e56be37587d7f29cffa0b4d6af598e6bf47
MD5 6a8c14ebc5d29350f3c9f0b98acf80e4
BLAKE2b-256 b89429608a773fc0066599a2cb506043bcaaeaa8dbad630d98c9226ac992de93

See more details on using hashes here.

File details

Details for the file pyvirgo36-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pyvirgo36-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for pyvirgo36-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9709f5d2884dab6ecd9e53fae56fd18a33f1e9e41111b7c330a0f2f61047fe92
MD5 c7a957b73d1882b2492adbb3e14de421
BLAKE2b-256 8bfaad2c8533ffd094abd44a51de6860ea30a32de3511a128333f764903b54d4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page