| Name | atlasopenmagic JSON |
| Version |
1.4.2
JSON |
| download |
| home_page | None |
| Summary | A utility package for retrieving ATLAS open data URLs and metadata. |
| upload_time | 2025-09-01 06:48:53 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3.9 |
| license | None |
| keywords |
atlas
open data
utilities
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# ATLAS Open Magic 🪄📊
[](https://github.com/atlas-outreach-data-tools/atlasopenmagic/actions/workflows/test.yml)

[](https://codecov.io/gh/atlas-outreach-data-tools/atlasopenmagic)
**`atlasopenmagic`** is a Python package made to simplify working with ATLAS Open Data by providing utilities to manage metadata and URLs for streaming the data.
### Key Features:
- Simple functions to set the active data release (e.g., `2024r-pp`).
- Efficient local caching of metadata to minimize API calls.
- Helper functions to retrieve specific dataset information, including file URLs for different "skims" (filtered versions of datasets).
- Support for multiple URL protocols (root, https, eos).
- Configuration via environment variables for easy integration into different workflows.
## **Installation**
You can install this package using `pip`.
```bash
pip install atlasopenmagic
```
Alternatively, clone the repository and install locally:
```bash
git clone https://github.com/atlas-outreach-data-tools/atlasopenmagic.git
cd atlasopenmagic
pip install .
```
## Documentation
You can find the full documentation for ATLAS Open Magic in the [ATLAS Open Data website](https://opendata.atlas.cern/docs/atlasopenmagic).
## Quick start
First, import the package:
```python
import atlasopenmagic as atom
```
See the available releases and set to one of the options given by `available_releases()`
```python
atom.available_releases()
set_release('2024r-pp')
```
Check in the [Monte Carlo Metadata](https://opendata.atlas.cern/docs/data/for_research/metadata) which datasets do you want to retrieve and use the 'Dataset ID'. For example, to get the metadata from *Pythia8EvtGen_A14MSTW2008LO_Zprime_NoInt_ee_SSM3000*:
```python
all_metadata = atom.get_metadata('301204')
```
If we only want a specific variable:
```python
xsec = atom.get_metadata('301204', 'cross_section')
```
To get the URLs to stream the files for that MC dataset:
```python
all_mc = atom.get_urls('301204')
```
To get some data instead, check the available options:
```python
atom.available_data()
```
And get the URLs for the one that's to be used:
```python
all_mc = atom.get_urls('2016')
```
## 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 (just run `pytest` from the main directory of the package).
Developers can also `pip install` including additional tools required for testing:
```bash
pip install atlasopenmagic[dev]
```
or with a local copy of the repository:
```bash
pip install '.[dev]'
```
### Pre-commit Hooks
We use pre-commit hooks, find below how to use them.
#### Installation
1. Install the `[dev]` dependencies if you haven't already, as shown above.
2. Install the git hook scripts:
```sh
pre-commit install
```
3. (Optional) Run against all files:
```sh
pre-commit run --all-files
```
#### What the hooks do
- **black**: Formats Python code consistently
- **isort**: Sorts imports alphabetically and separates them into sections
- **ruff**: Fast Python linter that catches common errors and style issues
- **codespell**: Checks for common misspellings in code and comments
- **trailing-whitespace**: Removes trailing whitespace
- **end-of-file-fixer**: Ensures files end with a newline
- **pydocstyle**: Checks docstring style (Google convention)
The hooks will run automatically on `git commit`.
If any hook fails, the commit will be blocked until the issues are fixed.
## License
This project is licensed under the [Apache 2.0 License](https://github.com/atlas-outreach-data-tools/atlasopenmagic/blob/main/LICENSE)
Raw data
{
"_id": null,
"home_page": null,
"name": "atlasopenmagic",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "ATLAS, Open Data, Utilities",
"author": null,
"author_email": "ATLAS Collaboration <atlas-outreach-opendata-support@cern.ch>",
"download_url": "https://files.pythonhosted.org/packages/03/15/668cb43410a1402dbe81dff9d88a9ca6175888e3314a04eaa84493648a3f/atlasopenmagic-1.4.2.tar.gz",
"platform": null,
"description": "# ATLAS Open Magic \ud83e\ude84\ud83d\udcca\n[](https://github.com/atlas-outreach-data-tools/atlasopenmagic/actions/workflows/test.yml)\n\n[](https://codecov.io/gh/atlas-outreach-data-tools/atlasopenmagic)\n\n\n**`atlasopenmagic`** is a Python package made to simplify working with ATLAS Open Data by providing utilities to manage metadata and URLs for streaming the data.\n\n### Key Features:\n- Simple functions to set the active data release (e.g., `2024r-pp`).\n- Efficient local caching of metadata to minimize API calls.\n- Helper functions to retrieve specific dataset information, including file URLs for different \"skims\" (filtered versions of datasets).\n- Support for multiple URL protocols (root, https, eos).\n- Configuration via environment variables for easy integration into different workflows.\n\n## **Installation**\nYou can install this package using `pip`.\n\n```bash\npip install atlasopenmagic\n```\nAlternatively, clone the repository and install locally:\n```bash\ngit clone https://github.com/atlas-outreach-data-tools/atlasopenmagic.git\ncd atlasopenmagic\npip install .\n```\n\n## Documentation\nYou can find the full documentation for ATLAS Open Magic in the [ATLAS Open Data website](https://opendata.atlas.cern/docs/atlasopenmagic).\n\n## Quick start\nFirst, import the package:\n```python\nimport atlasopenmagic as atom\n```\nSee the available releases and set to one of the options given by `available_releases()`\n```python\natom.available_releases()\nset_release('2024r-pp')\n```\nCheck in the [Monte Carlo Metadata](https://opendata.atlas.cern/docs/data/for_research/metadata) which datasets do you want to retrieve and use the 'Dataset ID'. For example, to get the metadata from *Pythia8EvtGen_A14MSTW2008LO_Zprime_NoInt_ee_SSM3000*:\n```python\nall_metadata = atom.get_metadata('301204')\n```\nIf we only want a specific variable:\n```python\nxsec = atom.get_metadata('301204', 'cross_section')\n```\nTo get the URLs to stream the files for that MC dataset:\n```python\nall_mc = atom.get_urls('301204')\n```\nTo get some data instead, check the available options:\n```python\natom.available_data()\n```\nAnd get the URLs for the one that's to be used:\n```python\nall_mc = atom.get_urls('2016')\n```\n\n\n## Contributing\nContributions are welcome! To contribute:\n\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature-name`).\n3. Commit your changes (`git commit -am 'Add some feature'`).\n4. Push to the branch (`git push origin feature-name`).\n5. Create a Pull Request.\n\nPlease ensure all tests pass before submitting a pull request (just run `pytest` from the main directory of the package).\n\nDevelopers can also `pip install` including additional tools required for testing:\n```bash\npip install atlasopenmagic[dev]\n```\nor with a local copy of the repository:\n```bash\npip install '.[dev]'\n```\n\n### Pre-commit Hooks\n\nWe use pre-commit hooks, find below how to use them.\n\n#### Installation\n\n1. Install the `[dev]` dependencies if you haven't already, as shown above.\n\n2. Install the git hook scripts:\n\n```sh\npre-commit install\n```\n\n3. (Optional) Run against all files:\n\n```sh\npre-commit run --all-files\n```\n\n#### What the hooks do\n\n- **black**: Formats Python code consistently\n- **isort**: Sorts imports alphabetically and separates them into sections\n- **ruff**: Fast Python linter that catches common errors and style issues\n- **codespell**: Checks for common misspellings in code and comments\n- **trailing-whitespace**: Removes trailing whitespace\n- **end-of-file-fixer**: Ensures files end with a newline\n- **pydocstyle**: Checks docstring style (Google convention)\n\nThe hooks will run automatically on `git commit`.\nIf any hook fails, the commit will be blocked until the issues are fixed.\n\n## License\nThis project is licensed under the [Apache 2.0 License](https://github.com/atlas-outreach-data-tools/atlasopenmagic/blob/main/LICENSE)\n",
"bugtrack_url": null,
"license": null,
"summary": "A utility package for retrieving ATLAS open data URLs and metadata.",
"version": "1.4.2",
"project_urls": {
"Documentation": "https://opendata.atlas.cern/docs/atlasopenmagic",
"Homepage": "https://opendata.atlas.cern/",
"Repository": "https://github.com/atlas-outreach-data-tools/atlasopenmagic"
},
"split_keywords": [
"atlas",
" open data",
" utilities"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "1d98711ea3095aa181c936af96c0d1cf12735574414954ccbff1c552ae6f6d2c",
"md5": "b9a06e1e95eccadd936b1a709232a9e7",
"sha256": "98f58aab1eba22aa3e545530ae262ad60c2a400309a918f5ecdccd78169fd3b1"
},
"downloads": -1,
"filename": "atlasopenmagic-1.4.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b9a06e1e95eccadd936b1a709232a9e7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 19006,
"upload_time": "2025-09-01T06:48:52",
"upload_time_iso_8601": "2025-09-01T06:48:52.806261Z",
"url": "https://files.pythonhosted.org/packages/1d/98/711ea3095aa181c936af96c0d1cf12735574414954ccbff1c552ae6f6d2c/atlasopenmagic-1.4.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0315668cb43410a1402dbe81dff9d88a9ca6175888e3314a04eaa84493648a3f",
"md5": "14b183ece851a418a155fa0fd217419d",
"sha256": "7868672f8905a6869fd3b21c99661cf153591c552a5f663b9c273971a10134f6"
},
"downloads": -1,
"filename": "atlasopenmagic-1.4.2.tar.gz",
"has_sig": false,
"md5_digest": "14b183ece851a418a155fa0fd217419d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 25603,
"upload_time": "2025-09-01T06:48:53",
"upload_time_iso_8601": "2025-09-01T06:48:53.893611Z",
"url": "https://files.pythonhosted.org/packages/03/15/668cb43410a1402dbe81dff9d88a9ca6175888e3314a04eaa84493648a3f/atlasopenmagic-1.4.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-01 06:48:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "atlas-outreach-data-tools",
"github_project": "atlasopenmagic",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "atlasopenmagic"
}