Skip to main content

A 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.1.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.1-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for electrospinning_data_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3ceac5e222fe33589b95b76e277179422ec9d91b725a857d9d72d43461d67785
MD5 6c1a200ed1954ab52eb9c3d3dc72fe87
BLAKE2b-256 cbc06a7dc1683b7c19f52c0680d03beb6c7d2844922bbd4e6cdbef32aba7eb9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for electrospinning_data_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b58e106ab14bd1881634dfbf8ddac4740755382a9229b1d894f794c6983a4397
MD5 36f78dfaec73fb613c220c97197e2a7e
BLAKE2b-256 58f88a9964d86415059b014dbef4d4667682518dc877d275ab394c6fda25a3bf

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