Unofficial Python client for downloading and exploring FlyBase datasets.
Project description
FlyBase Downloads (FBD)
FlyBase Downloads (FBD) is a lightweight Python library that provides programmatic access to selected datasets from FlyBase, allowing researchers to search, download, and load biological datasets directly into Python objects (e.g. pandas DataFrames) for analysis, exploration, and machine learning workflows.
Offline mode note: FBD can reuse previously downloaded datasets through its local cache when calling download_file(). Offline support currently applies only to cached dataset downloads, metadata and browsing features such as categories, search, descriptions, and column descriptions still require a network connection.
Important: This is an unofficial library.
All data is retrieved directly from FlyBase, and availability depends entirely on FlyBase’s public resources.
Purpose
This library is designed for:
- Academic and educational use
- Bioinformatics analysis
- Data exploration in Jupyter notebooks
- Machine learning and data science pipelines
It is not intended for high-frequency or automated bulk downloading.
Installation and Import
pip install flybasedownloads
from FBD.fbd import FBD
Basic Usage
List available categories
fbd = FBD()
categories = fbd.get_categories()
print(categories)
List datasets by category
fbd = FBD()
files_by_cat = fbd.get_files_by_category("Genes")
print(files_by_cat)
Search for a dataset (exact or partial match)
Exact match
fbd = FBD()
dataset = fbd.search_file("gene_genetic_interactions")
print("Selected dataset:", dataset)
Partial matches
fbd = FBD()
matches = fbd.search_file("gene")
print("Possible datasets:")
for m in matches:
print("-", m)
Download datasets
Initialize with a dataset and download directly
fbd = FBD("gene_genetic_interactions")
df = fbd.download_file()
Download multiple datasets sequentially
fbd = FBD()
fbd.set_dataset("antibody_information")
df1 = fbd.download_file()
fbd.set_dataset("gene_genetic_interactions")
df2 = fbd.download_file()
Dataset metadata
Retrieve column descriptions
column_info = fbd.get_column_descriptions(
columns=[
"Starting_gene(s)_symbol",
"Ending_gene(s)_symbol",
"Interaction_type"
]
)
print(column_info)
Example: preparing data for ML
X = df[[
"Starting_gene(s)_symbol",
"Ending_gene(s)_symbol"
]]
y = df["Interaction_type"]
Rate limiting & responsible use
To protect shared infrastructure and respect FlyBase resources, downloads are rate-limited by default. -The download limit is enforced internally -The library is intended for academic use only -Bulk or automated scraping is strongly discouraged
Advanced users can modify the download limits via the Config class and config.json, but: We strongly ask users NOT to bypass rate limits, as this project does not have the infrastructure to support large-scale or abusive usage.
Data source & disclaimer
-All datasets are retrieved directly from FlyBase -This library is not affiliated with FlyBase -Dataset availability may change over time -Some datasets may become unavailable or updated without notice
If you need guaranteed access or bulk data, please use FlyBase’s official distribution channels. Official FlyBase Downloads Overview: FlyBase:Downloads_Overview
Citation
If you use this library in academic work, please cite FlyBase as the original data source.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flybasedownloads-4.1.1.tar.gz.
File metadata
- Download URL: flybasedownloads-4.1.1.tar.gz
- Upload date:
- Size: 16.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d97d4b017f551540a12152b8e1bfd0ef6deb3049b8f63dbf207f4dfac8940af7
|
|
| MD5 |
bfe3f6c5ef361d9f171bb03cd5e58653
|
|
| BLAKE2b-256 |
ed9f92885bfd484b531eb512fc446c40a182ad34d0125bb8cdac1cca6c85dfd6
|
File details
Details for the file flybasedownloads-4.1.1-py3-none-any.whl.
File metadata
- Download URL: flybasedownloads-4.1.1-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab8ca5d9ada9c3feebc0570a9e9663684c7d5b38c5a90892f7b12f6b7d331037
|
|
| MD5 |
f03041c38ebd63bb4d0480d8432a816a
|
|
| BLAKE2b-256 |
4bb1d0462a93869358252081ff07074547a481d2345a967201a8a372592527b5
|