JGF(Z) format implementation
This package implements export and import functions for the JSON Graph Format (gZipped) JGF(Z) (https://jsongraphformat.info). Supported input formats/libraries are networkx, igraph, numpy matrices and JXNF files. All network, node and edges attributes are saved as well.
This project is being developed to support the new network datatype for (brainlife.io).
Authors
Funding
Installation
You can install this package using pip:
pip install jgf
or install it from this git repository:
git clone <repository URL>
cd <repository PATH>
pip install -e ./
API Reference
API reference can be found in (https://jgf.readthedocs.io/).
Example of use
To use the library in igraph environment simply import the correct module and run save or load functions:
import igraph as ig
import jgf.igraph as jig
g = ig.Graph.Famous("Zachary")
# will save a compressed file
jig.save(g,"zachary.jgfz")
g, = jig.load("zachary.jgfz")
You can also use it to save and load connectivity matrices as square numpy matrices:
import numpy as np
import jgf.conmat as jcm
A = np.array([
[ 0, 0.1, 0.2, 0, 0],
[ 0, 0, 0, 0.5, 0],
[ 0, 0, 0, 0, 1.0],
[1.0, 1.0, 0, 0, 0],
[ 0, 0, 0.5, 0, 0],
])
nodeProperties = {
"name" : [
"Node 1",
"Node 2",
"Node 3",
"Node 4",
"Node 5",
]
}
# will save a compressed file
jcm.save(A,"example.jgfz",label= "Example", nodeProperties=nodeProperties)
B,properties = jcm.load("example.jgfz",getExtraData=True)
Metadata
Release files for jgf 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jgf-0.2.2.tar.gz | 9.6 kB | Without provenance | Details for jgf-0.2.2.tar.gz |
Release files / jgf-0.2.2.tar.gz
| Download URL | jgf-0.2.2.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b07509862a47e02c6b5d46906d62efad2b4b29d5d1879e5cbf6e572e2a1a62c4
|
|
BLAKE2b-256 checksum How to use checksums |
6b72d5458c0b58f7904b648973280f67f43689ab7f061522c9f84982771a4911
|
| 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/46.1.3 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7
|
Security for jgf 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.