Skip to main content

p2api

The ESO Phase 2 Application Programming Interface (API) uses the lightweight JSON standard as data format to exchange information between your application and the Phase 2 server at ESO. In order to program more conveniently against the API, it is helpful to create small, language-specific bindings to the API. We provide a simple example binding for Python, i.e. p2api.

As of version 1.1.0: Added support for triggering RRMs and ToOs.

As of version 1.0.10: Removed script p2api_add_absolute_time_intervals.

As of version 1.0.7: Improved backward compatibility for older systems.

As of version 1.0.6: Added script p2api_add_absolute_time_intervals.

As of version 1.0.3: support for <url>,<access_token> constructor.

As of version 0.97.2: support for La Silla.

Please see the ESO-USD p2api page for more details.

Phase 2 programmatic API documentation can be found here.

Create a dedicated Virtual Environment for p2api

bash
python -m venv "${HOME}/envs/p2api"
. "${HOME}/envs/p2api/bin/activate"
python -m pip install --upgrade pip
python -m pip install p2api

To trigger an RRM observation

First activate the environment ( if it is not already activated):

bash
. "${HOME}/envs/p2api/bin/activate"

Next save your ESO User Portal credentials in the keyring if you want to be able to trigger without being prompted for the password each time:

up_username=<ESO_User_Portal_username>
p2api_rrm_trigger -u ${up_username} -S

Now you are ready to make a test trigger:

up_username=<ESO_User_Portal_username>
p2api_rrm_trigger -u ${up_username} \
    --env=production \
    --obId=1234567 \
    --account_id=12345 --RA=10:20:30.000 --DEC=-35:01:30.600 \

To make an actual trigger, add the command line argument --NOT_A_TEST.

Metadata

Release files for p2api 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for p2api 1.2.0
File Size Uploaded Provenance Actions
p2api-1.2.0.tar.gz 34.3 kB Without provenance Details for p2api-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for p2api 1.2.0
File Interpreter ABI Platform Actions
p2api-1.2.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for p2api-1.2.0-py2.py3-none-any.whl

Total release size: 76.8 kB

Release files / p2api-1.2.0.tar.gz

Download URL p2api-1.2.0.tar.gz
Size 34.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5c3d599d9574bed562c9d3ccff2bf32a2171836edb4e0d67eb31fd612b94624e
BLAKE2b-256 checksum
How to use checksums
626f66061fe9948c72e772ab56b56154886dbe3679d4676604d99e46a2e0cede
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / p2api-1.2.0-py2.py3-none-any.whl

Download URL p2api-1.2.0-py2.py3-none-any.whl
Size 42.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f67849eeef3c2320ce1a76e4d35beca0f297290d4b759b1006171db58cc9ee01
BLAKE2b-256 checksum
How to use checksums
d95d670a9bdce22abad9ff6a382e54c466d748d9d676c18ddab2c7a075f1b794
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Security for p2api 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page