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 two seconds and will create a database of graphs with an 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 half an hour).

Some examples

graphreveal search "10 edges, bipartite, no isolated vertices, 2 components"
graphreveal count "5..6 vertices, connected"

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.

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.0.0.tar.gz (730.2 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.0.0-py3-none-any.whl (730.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for graphreveal-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e1fbcab02dfaeca7e857f321d734a2e99de41bc8fbe6995ea8f787727744bb2c
MD5 bdf5943bcc35b8ab71e7cc7a2e3c2724
BLAKE2b-256 006308dd3bd806ac37b16b4354567011ecf59cc7512129a2fc86e8e6ab74f7b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for graphreveal-1.0.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.0.0-py3-none-any.whl.

File metadata

  • Download URL: graphreveal-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 730.8 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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 acd309b0433766bf134dc722f69b3ad4499c2384ebcd2d8940e8ad49c1912b43
MD5 7ed0ab87c3100220ec946438ae7d5c62
BLAKE2b-256 39bb1eb257c872881ce64c2da477be1c42f13e5c7ccc9c874245fa44164c5ecf

See more details on using hashes here.

Provenance

The following attestation bundles were made for graphreveal-1.0.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