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

Uploaded Source

Built Distribution

pybel_cx-0.1.3-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pybel_cx-0.1.3.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for pybel_cx-0.1.3.tar.gz
Algorithm Hash digest
SHA256 5ed2a8fdca2fc91b03b7f44940bc1188d204af4a79f73dfdf445da6cbdcdbc74
MD5 d97a8be3fde00d346d08fe594f36f9f4
BLAKE2b-256 1aacaf5296e438ac66b90f7569e42a67b1902c00894d5cae98064c2f4a8b4acd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pybel_cx-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for pybel_cx-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2ecc2e9d9b5db9a044ec798dc5c6f05fd1093299caf315f2d230746e94c7bf32
MD5 1186a5b9467717a39e60a9885b47d5a7
BLAKE2b-256 3208d075949c4a1253638555589f390c64aaa3c5a0dfdeb87222adb4c2120cdd

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