Skip to main content

A utility package for retrieving ATLAS open data URLs and metadata.

Project description

Atlas Open Magic 🪄📊

Atlas Open Magic is a Python package designed to simplify working with ATLAS Open Data by providing utilities to manage metadata and URL mappings efficiently.


Features

  • Metadata Retrieval:

    • Retrieve metadata for datasets using a user-friendly API.
    • Access specific fields or full metadata entries for datasets.
  • URL Mapping:

    • Map dataset IDs to their corresponding URLs for efficient file access.

Installation

You can install this package using pip. (Include the installation instructions based on your distribution method.)

pip install atlasopenmagic

Alternatively, clone the repository and install locally:

git clone https://github.com/yourusername/atlasopenmagic.git
cd atlasopenmagic
pip install .

Usage

Retrieving metadata

Use the get_metadata function to retrieve metadata for a dataset.

Example:

from atlasopenmagic.metadata import get_metadata

# Retrieve full metadata for a dataset
metadata = get_metadata("301204")
print(metadata)

# Retrieve a specific metadata field
cross_section = get_metadata("301204", "cross_section")
print(f"Cross-section: {cross_section}")

Getting URLs

Use the get_urls function to retrieve URLs for a dataset ID.

Example:

from atlasopenmagic.urls import get_urls

# Retrieve URLs for a dataset
urls = get_urls(700200)
print(urls)

Testing

This project includes a test suite to ensure the correctness of the core functions.

Run Tests

Run all tests using the following command:

python -m unittest discover -s tests

Example Output:

.......
----------------------------------------------------------------------
Ran 7 tests in 1.023s

OK

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-name).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push to the branch (git push origin feature-name).
  5. Create a Pull Request.

Please ensure all tests pass before submitting a pull request.

License

This project is licensed under the Apache 2.0 License

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

atlasopenmagic-0.1.0.tar.gz (59.8 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: atlasopenmagic-0.1.0.tar.gz
  • Upload date:
  • Size: 59.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for atlasopenmagic-0.1.0.tar.gz
Algorithm Hash digest
SHA256 841e763c89f00ba4d2e991e11b4829d72ead0fa9194900ebf3c6f2529b2ae648
MD5 192f88f74bc6fc655ac73d95674f6888
BLAKE2b-256 bb91145dfc31b05f86ce7b390a406c16ca0d36672ba823731092ea7466ab956d

See more details on using hashes here.

Provenance

The following attestation bundles were made for atlasopenmagic-0.1.0.tar.gz:

Publisher: build-and-publish.yml on atlas-outreach-data-tools/atlasopenmagic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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