fragalysis-target-access-authenticator-python-client
A simple Python 3 client to simplify access to the authenticator, providing the following functions: -
def get_auth_target_access(username: str) -> set[str]:
[...]
def get_auth_users(target_access_string: str) -> TasAuthUsersGetResponse:
[...]
def get_auth_version() -> TasAuthVersionGetResponse:
[...]
def get_auth_ping() -> TasAuthPingGetResponse:
[...]
get_auth_users() (which needs authenticator 1.5.0 or later) returns a
response rather than a bare set because, unlike get_auth_target_access(), it
has to distinguish "the TAS has no members" from "we could not find out": -
response = ta_auth_connector.get_auth_users("lb32627-66")
if response.error:
# We do not know who the members are - 'users' is empty but meaningless
...
else:
# 'users' is the membership, and may legitimately be empty
...
From 1.2.0 the response also has members, the same users (sorted by login)
as TasAuthMember objects carrying each user's given_name and family_name.
These need authenticator 1.6.0 or later - with an older authenticator the
members are the users with names of None.
The module requires two items, extracted from the environment: -
TA_AUTH_SERVICE- The service hostname. In cluster this might behttp://auth.ta-authenticator.svc(an internal connection that is expected to comply with http:// protocol)TA_AUTH_QUERY_KEY- A 'secret' key the service expects in request headers.
Usage
After installing from PyPI, access the ta_auth_connector functions directly
via the connector module: -
import ta_auth_connector
ping_response: TasAuthPingGetResponse = ta_auth_connector.get_auth_ping()
Target access strings
A Target Access String (TAS) is the concatenation of a two-character code
(lower case), proposal number, and visit number formatted
as <code><proposal>-<visit>: -
- lb12345-1
- lb32627-66
Rules
Access to non-public Fragalysis Targets is limited to users who are members
of the associated TAS. If a target belongs to lb32627-66 (and lb32627-66 is not
a publicly visible target) you will not be permitted access to the material
unless, according to ISPyB, you are a member of proposal 32627 and visit 66.
Also, although everyone can view publicly visible targets you are not permitted to alter or add material to the target unless you are a member of the corresponding proposal and visit. Everyone can see public targets, but only members of the TAS can edit.
The authenticator service
See: -
- https://github.com/xchem/fragalysis-ispyb-target-access-authenticator
- https://github.com/xchem/fragalysis-mock-target-access-authenticator
Metadata
Release files for xchem-ta-auth-client 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| xchem_ta_auth_client-1.2.0.tar.gz | 12.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| xchem_ta_auth_client-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.3 kB
Release files / xchem_ta_auth_client-1.2.0.tar.gz
| Download URL | xchem_ta_auth_client-1.2.0.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
92d06ffdd921221ea9c7f595911201d6a699fb5772d9cf55d5d09d10b5f2049e
|
|
BLAKE2b-256 checksum How to use checksums |
86c49835b5372c227279bf3562345269d4c3e5619017334011c90c89ea2c9710
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.
Transparency logRelease files / xchem_ta_auth_client-1.2.0-py3-none-any.whl
| Download URL | xchem_ta_auth_client-1.2.0-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
475c5c9dde601f0b0854fdf51f7f5ba5ea2475f01e4e6e7d09ba1c9c894ad0c0
|
|
BLAKE2b-256 checksum How to use checksums |
c9002b4622bc3c1b83661bab0a818630b10f964ee3308939803310ade72d945e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.
Transparency log