Skip to main content

Small graphs database and search system

Project description

GraphReveal

PyPI - Python Version PyPI - Version Test

Have you ever needed an example of a graph that, e.g., is Hamiltonian, has exactly 8 vertices, and can be drawn on a plane without intersecting edges? Or wondered how many graphs of size 10 are bipartite, have no isolated vertices, and have exactly two components?

This package aims to answer some of your questions. You can search through all graphs with some reasonable order (currently 9 is the maximum) using a very simple DSL (domain-specific language).

Installation

Make sure that you have Python in a sufficiently recent version. To install the package using pip, you can use the following command:

pip install graphreveal

Basic usage

Firstly, you should create the database:

graphreveal create-database

This process should take less than a second and will create a database of graphs with order no greater than 7. To use a larger database, add the --n 8 or --n 9 flag to this command (it should take no more than a couple of minutes).

Some examples

graphreveal search "10 edges, bipartite, no isolated vertices, 2 components"
graphreveal count "5..6 vertices, connected"
graphreveal count "5 vertices, connected, not (eulerian | planar)"

Command search will print a list of graphs in graph6 format. You can use houseofgraphs.org to visualize them. Command count will simply output the number of specified graphs.

List of available properties

  • [N] vertices (alternatives: verts,V, nodes)
  • [N] edges (alternative: E)
  • [N] blocks (alternative: biconnected components)
  • [N] components (alternative: C)
  • acyclic (alternative: forest)
  • bipartite
  • complete
  • connected
  • cubic (alternative: trivalent)
  • eulerian (alternative: euler)
  • hamiltonian (alternative: hamilton)
  • no isolated vertices (alternatives: no isolated v, niv)
  • planar
  • regular
  • tree

As [N], you can use a simple number or range (e.g., 3-4, 3..4, < 5, >= 2). You can also negate any property using ! or not. Use | for alternatives (disjunction) and parentheses () for grouping. Conjunction (, or ;) binds tighter than |.

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

graphreveal-1.3.0.tar.gz (731.6 kB view details)

Uploaded Source

Built Distribution

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

graphreveal-1.3.0-py3-none-any.whl (731.9 kB view details)

Uploaded Python 3

File details

Details for the file graphreveal-1.3.0.tar.gz.

File metadata

  • Download URL: graphreveal-1.3.0.tar.gz
  • Upload date:
  • Size: 731.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for graphreveal-1.3.0.tar.gz
Algorithm Hash digest
SHA256 a54f8fd96db810d4be8f4d1240dafee5d347f90dc2323b656c3791ad84fa1ecc
MD5 574a3eb7330ed50f45fec0a98812e246
BLAKE2b-256 03594f4728d2fea4657cab03831d60f6f447915f14ca814aee04cf40c31dcd40

See more details on using hashes here.

Provenance

The following attestation bundles were made for graphreveal-1.3.0.tar.gz:

Publisher: release.yml on mdbrnowski/GraphReveal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file graphreveal-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: graphreveal-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 731.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for graphreveal-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6674ba38084ed6dde4bb452baf0ec962a8af201fe7dc57a08ab3369184cda8ff
MD5 68ff6990d16da21a2c0a1ad390f4cd96
BLAKE2b-256 69463022c46c63998ff9494ecf82f95dc3d60eff57f4682910e77a53b83f7a10

See more details on using hashes here.

Provenance

The following attestation bundles were made for graphreveal-1.3.0-py3-none-any.whl:

Publisher: release.yml on mdbrnowski/GraphReveal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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