Skip to main content

A PyBEL extension for interconversion with CX

Project description

A PyBEL extension for interconversion with CX.

Installation Current version on PyPI Stable Supported Python Versions MIT License

PyBEL-CX can be installed easily from PyPI with the following code in your favorite terminal:

$ python3 -m pip install pybel-cx

or from the latest code on GitHub with:

$ python3 -m pip install git+https://github.com/pybel/pybel-cx.git

Command Line Usage

PyBEL-CX installs two command line utilities: bel_to_cx and cx_to_bel.

CX to BEL

Running this script has the caveat that the CX document should conform to the schema created by PyBEL-CX.

$ cat my_network.cx | cx_to_bel > my_network.bel

BEL to CX

$ cat my_network.bel | bel_to_cx > my_network.cx

Since this operation can be expensive, PyBEL caches namespace resources. The -c flag can be used to specify a database connection string to use a high performance RDBMS instead of the default SQLite. For example, if you would like to use MySQL, this database string will look something like mysql+pymysql://<username>:<password>@<host>/<dbname>?charset=utf8[&<options>]. Be sure to pip install the connector, which is pymysql in this example.

$ pip install pymysql
$ cat my_network.bel | bel_to_cx -c "mysql+pymysql://root:root@localhost/mydb?charset=utf8" > my_network.cx

More documentation on connection strings at http://pybel.readthedocs.io/en/latest/manager.html#pybel.manager.BaseManager.from_connection.

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

pybel_cx-0.1.1.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

pybel_cx-0.1.1-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file pybel_cx-0.1.1.tar.gz.

File metadata

  • Download URL: pybel_cx-0.1.1.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pybel_cx-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d0ab07f43e6acd7c79c686a738ddafe188b93a62a31b6068cd9b0824125128cc
MD5 57ad4029aa029a65d0433172e07359e8
BLAKE2b-256 8e955bded6eb3826c06aa07657655dfd70f9676bfa9adfcdd1fcb03938067107

See more details on using hashes here.

File details

Details for the file pybel_cx-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pybel_cx-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7163fe72818f65ceedbebe1a16e963cf0358dc27f697cb6789ebbbf6ad368702
MD5 b6edf7d9494db62ac6f6b076470dcf4a
BLAKE2b-256 b3c63a3bdf9b6318b5486e36b8ffcbc6d965ed76586ac7e55a5857e6da547fb7

See more details on using hashes here.

Supported by

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