Skip to main content

flyconn

Research-grade Python toolkit over the public Drosophila connectomes (MaleCNS v1.0, FlyWire v630/v783, hemibrain, MANC, BANC): a harmonized offline data layer, signed sparse graphs, uncertainty propagation, a validated cross-platform LIF simulator, declarative in-silico experiments with reports, and cross-dataset comparison.

Status: pre-alpha; milestones M0–M7 of docs/PLAN.md are implemented and validated against published results on real data (docs/GOLDEN_RESULTS.md, docs/PROGRESS.md).

Install

pip install "flyconn[sim]"            # data, graph, uncertainty, simulator
pip install "flyconn[sim,interpret]"  # + connectome_interpreter adapter

The interpret extra resolves connectome-interpreter 2.9.5 from PyPI; flyconn's parity tests run against a newer git commit of that package (see ADR-0002), so treat the PyPI combination as untested until upstream releases again. Documentation: https://moiz-lakkadkutta.github.io/flyconn/

Quickstart

uv sync --extra sim --extra interpret --extra access
uv run flyconn data list
uv run flyconn data pull malecns@1.0 --level weights      # ~1.1 GB, checksummed, resumable
uv run flyconn data pull shiu@630 --level weights          # Shiu et al. 2024 model inputs (90 MB)
uv run flyconn run examples/specs/w2_malecns_lb3_silence_gng232.yaml --out runs/w2

Python:

from flyconn.data.store import Store
from flyconn.graph import ConnectivityMatrix, find_paths
from flyconn.uncertainty import path_stability

m = ConnectivityMatrix.from_store(Store.open("malecns@1.0"), min_weight=5)
lb3 = m.meta.index[m.meta["cell_type"].str.match(r"^LB3", na=False)]
mn9 = m.meta.index[m.meta["cell_type"] == "MN9"]
paths = find_paths(m, lb3, mn9, max_hops=3, min_edge_fraction=0.01, label="cell_type")
stab = path_stability(m, lb3, mn9, thresholds=[5, 10, 20], n_samples=100, seed=0)

Anchor workflows: examples/w1_pathways.py, examples/w4_version_drift.py, examples/specs/w2_*.yaml, examples/w3_male_vs_female.py, examples/w5_driver_lines.py. Scientific caveats: docs/caveats.md.

Not to be confused with the Cambridge FlyConnectome group's tools (cocoa, flywire_annotations); flyconn is independent and builds on that ecosystem.

Scientific stance

A connectome is wiring. Neurotransmitter identities are predicted, weights are synapse counts, and every simulation output is a model prediction. Controls run by default, uncertainty is propagated, and every result carries provenance and the citations of the datasets it used. See docs/caveats.md once written.

Licence and attribution

Code: Apache-2.0. Data: CC BY 4.0 by the respective consortia; every result object emits the citation list it depends on. Design ideas borrowed from MIT-licensed projects are listed in ATTRIBUTION.md.

Metadata

Release files for flyconn 0.4.0

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

Source distribution (sdist)

Source distribution for flyconn 0.4.0
File Size Uploaded Provenance Actions
flyconn-0.4.0.tar.gz 562.6 kB With provenance Details for flyconn-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flyconn 0.4.0
File Interpreter ABI Platform Actions
flyconn-0.4.0-py3-none-any.whl Python 3 none any Details for flyconn-0.4.0-py3-none-any.whl

Total release size: 724.8 kB

Release files / flyconn-0.4.0.tar.gz

Download URL flyconn-0.4.0.tar.gz
Size 562.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c17c1bd10e8db35ea961d975808c5992df3add829e463dfd1a4531a2935b2f89
BLAKE2b-256 checksum
How to use checksums
a5122670d2d374913b97cf93306111524b2daa28a155bbeecadf49ada0c51e4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Release files / flyconn-0.4.0-py3-none-any.whl

Download URL flyconn-0.4.0-py3-none-any.whl
Size 162.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f3cbf3ead747125b8f0706e30594daf38c94e9ab42a62070abeaa196abe6f9e9
BLAKE2b-256 checksum
How to use checksums
fbeb6bffe49d612f9c3c23ff5b00435b801062a20866d5a847704b3011f87249
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Security for flyconn 0.4.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for flyconn-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

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.

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