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.1

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.1
File Size Uploaded Provenance Actions
p2api-1.2.1.tar.gz 34.3 kB Without provenance Details for p2api-1.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 76.8 kB

Release files / p2api-1.2.1.tar.gz

Download URL p2api-1.2.1.tar.gz
Size 34.3 kB
Tags Source
SHA-256 checksum
How to use checksums
26d280e551f3f3f128a5bc86cc253e26933a1ebff42bc22edbdfb92166c7b14c
BLAKE2b-256 checksum
How to use checksums
d9b0caa7e64249a659a02ae0fc35e76b256ed01cdbfcc696ca2bb4a062539833
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.1-py2.py3-none-any.whl

Download URL p2api-1.2.1-py2.py3-none-any.whl
Size 42.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
cad57ba36823988116c6a464b5746751d9fb4a3cc74d43fae7b5d2cdafc2cc13
BLAKE2b-256 checksum
How to use checksums
91904ef1203d7aa631581f86f3338bb8b47c92b663c0c7a68abd22a6a3d40cd3
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.1

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.1 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