Skip to main content

A production-ready Python client for the Electrospinning Data Public API

Project description

Electrospinning Data Client

A Python library for programmatic access to the Electrospinning Data Public API.

Features

  • Easy Data Retrieval: Download the latest dataset directly into a pandas DataFrame.
  • Versioning Support: Access specific immutable version snapshots for reproducible research.
  • Advanced Filtering: Apply complex filters (string matches, numeric ranges) directly in your queries.
  • Multiple Formats: Export data to XLSX, JSON, or download image archives (ZIP).
  • Researcher Friendly: Designed for ease of use in Jupyter Notebooks and data science workflows.

Installation

Install using pip:

pip install electrospinning-data-client

Quick Start

Load the Latest Dataset

import electrospinning_data_client as ed

# Download the latest dataset as a pandas DataFrame
df = ed.load_latest_dataset()

print(f"Retrieved {len(df)} records")
print(df.head())

Apply Filters

Recover PAN produced with voltage between 20 and 30 kV:

filters = {
    "polymer": "PAN",
    "voltageMin": 20,
    "voltageMax": 30
}

df = ed.load_latest_dataset(filters=filters)

Access Specific Versions

# List available versions
client = ed.ElectrospinningDataClient()
versions = client.get_versions()

# Download a specific version
df_v1 = ed.load_versioned_dataset("v1.0.0")

Export to Excel or ZIP

client = ed.ElectrospinningDataClient()

# Export to Excel
client.export_file("my_data.xlsx", export_format="xlsx", filters={"polymer": "PAN"})

# Download image archive
client.export_file("images.zip", export_format="zip")

API Reference

ElectrospinningDataClient

Main class for API interaction.

  • get_versions(): Returns a list of available dataset versions.
  • download_latest(filters=None): Returns a pandas DataFrame of the latest records.
  • download_version(version, filters=None): Returns a pandas DataFrame for a specific version.
  • export_file(output_path, export_format='xlsx', version='latest', filters=None): Saves data to a local file.
  • load_records(skip=0, limit=100, version='latest', filters=None): Returns a raw dictionary of paginated records.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

electrospinning_data_client-0.1.0.tar.gz (27.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

electrospinning_data_client-0.1.0-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file electrospinning_data_client-0.1.0.tar.gz.

File metadata

File hashes

Hashes for electrospinning_data_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f2f7f1e66973e3f8eb4efb675f58832a5f12966b6ff00fcbeea2937dcf6f4569
MD5 96273d2c2d369afe34ef3e1114acd301
BLAKE2b-256 b016299e787dcd14b8472e17332bece231b5a89e822df2432ed72b9cf9ebae32

See more details on using hashes here.

File details

Details for the file electrospinning_data_client-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for electrospinning_data_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 de6009ee5559af8997b167e10dd10bb536083917671195564a9c140d2d0a60e7
MD5 5aa2f99076ee057e448a159d55b34f55
BLAKE2b-256 5e03d85768a1447e46b1b0453c2f5027df451895956a679a3d31399ad6ce1804

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page