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:
- Fork the repository.
- Create a new branch (
git checkout -b feature-name). - Commit your changes (
git commit -am 'Add some feature'). - Push to the branch (
git push origin feature-name). - 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
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
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
841e763c89f00ba4d2e991e11b4829d72ead0fa9194900ebf3c6f2529b2ae648
|
|
| MD5 |
192f88f74bc6fc655ac73d95674f6888
|
|
| BLAKE2b-256 |
bb91145dfc31b05f86ce7b390a406c16ca0d36672ba823731092ea7466ab956d
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atlasopenmagic-0.1.0.tar.gz -
Subject digest:
841e763c89f00ba4d2e991e11b4829d72ead0fa9194900ebf3c6f2529b2ae648 - Sigstore transparency entry: 190930311
- Sigstore integration time:
-
Permalink:
atlas-outreach-data-tools/atlasopenmagic@f91b43b4863e6285dcc5cc41bd9f4f9ce1eee8d4 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/atlas-outreach-data-tools
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-and-publish.yml@f91b43b4863e6285dcc5cc41bd9f4f9ce1eee8d4 -
Trigger Event:
release
-
Statement type: