Skip to main content

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.

Metadata

Release files for pybel-cx 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pybel-cx 0.1.3
File Size Uploaded
pybel_cx-0.1.3.tar.gz 23.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pybel-cx 0.1.3
File Interpreter ABI Platform
pybel_cx-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 35.6 kB

Release files / pybel_cx-0.1.3.tar.gz

Download URL pybel_cx-0.1.3.tar.gz
Size 23.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5ed2a8fdca2fc91b03b7f44940bc1188d204af4a79f73dfdf445da6cbdcdbc74
BLAKE2b-256 checksum
How to use checksums
1aacaf5296e438ac66b90f7569e42a67b1902c00894d5cae98064c2f4a8b4acd
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / pybel_cx-0.1.3-py3-none-any.whl

Download URL pybel_cx-0.1.3-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2ecc2e9d9b5db9a044ec798dc5c6f05fd1093299caf315f2d230746e94c7bf32
BLAKE2b-256 checksum
How to use checksums
3208d075949c4a1253638555589f390c64aaa3c5a0dfdeb87222adb4c2120cdd
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page