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.2.tar.gz (23.3 kB view details)

Uploaded Source

Built Distribution

pybel_cx-0.1.2-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pybel_cx-0.1.2.tar.gz
  • Upload date:
  • Size: 23.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0

File hashes

Hashes for pybel_cx-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4ec71a3edbdfea684dec5b6539571e2a3f64ae14ed3bdb205c27655de892502d
MD5 8c06828004d03471f1b113309dfdd159
BLAKE2b-256 225fd877d45ce469b601f2ae08ca9b19a26ac4a29ca5bb346f4922e9a5a7e586

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pybel_cx-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0

File hashes

Hashes for pybel_cx-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d4649337f58badd55cc5294eb783f224875cd5269181a4d93e0e9d9d6ff97bef
MD5 336a62a229eefc9c22a7514edc0b6b64
BLAKE2b-256 b1445b42658c2a86ab0b0536d39efd02ce1493c8114d440b0816c2ca8b65e2d7

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