A PyBEL extension for interconversion with CX
Project description
A PyBEL extension for interconversion with CX
Installation
Before this is deployed to PyPI, it can be installed 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pybel_cx-0.1.0.tar.gz
.
File metadata
- Download URL: pybel_cx-0.1.0.tar.gz
- Upload date:
- Size: 21.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4fe608b93bb38f021e2cb40e6526851618d996a79acb12dbfa21a66e271e642 |
|
MD5 | 92d70187365784f8ad77d0c67a7b2386 |
|
BLAKE2b-256 | 9529e91c0c2cb339532d34a763979e99933e26924ecd1638461036b47896e258 |
File details
Details for the file pybel_cx-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: pybel_cx-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec85814ce1666be3cad845664d165e3a1624833d6f833802039fa460789f8f26 |
|
MD5 | f1a7740b9c56ef9d5f39f6c571bfa145 |
|
BLAKE2b-256 | 20a159228b6e5bc6a885b66498a0d317d394c89a06bfaae8f66f0478419fe300 |