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.2.3: Support for triggering RRMs and getting their status as well as that of the system.

As of version 1.2.3: Support for triggering RRMs is posibly actually functional!

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

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.5
File Size Uploaded Provenance Actions
p2api-1.2.5.tar.gz 37.7 kB Without provenance Details for p2api-1.2.5.tar.gz

Built distribution (wheel)

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

Total release size: 89.6 kB

Release files / p2api-1.2.5.tar.gz

Download URL p2api-1.2.5.tar.gz
Size 37.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9ac19aff1a3375f3582dca50ca0a14c3d3db2d5981ebc80ba35f06d84df9526e
BLAKE2b-256 checksum
How to use checksums
d2de5d898fd297341b4f7d8bcda6794159048a2dfc3af5deef8c574a48a4f4fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

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

Download URL p2api-1.2.5-py2.py3-none-any.whl
Size 51.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ca211acecacc48c7c37f139a98d1599756de9db291121e0c5898678baae60eef
BLAKE2b-256 checksum
How to use checksums
3046aa0d6ee02b9bb362c293e34ccca63f61039e6c35fb65d8d78c2f29c9df41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for p2api 1.2.5

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