tom_swift
Neil Gehrels Swift Observatory facility module for TOM Toolkit. This module uses the Swift TOO API for all its interactions with the Swift Observatory. When installed and configured, your TOM can query target visibility, submit TOO observation requests to Swift, and check TOO observation status.
Swift TOO Prerequisites
In order to submit TOO requests to Swift, you must register with the Swift TOO system. Once you are registered and have logged in, you can get your shared secret, which you will use, along with your username, to make TOO requests. See the Configuration section below.
Installation
Install the module into your TOM environment:
pip install tom-swift
-
In your project
settings.py, addtom_swiftto yourINSTALLED_APPSsetting:INSTALLED_APPS = [ ... 'tom_swift', ]
-
Add
tom_swift.swift.SwiftFacilityto theTOM_FACILITY_CLASSESin your TOM'ssettings.py:TOM_FACILITY_CLASSES = [ 'tom_observations.facilities.lco.LCOFacility', ... 'tom_swift.swift.SwiftFacility', ]
Configuration
Include the following settings inside the FACILITIES dictionary inside settings.py:
FACILITIES = {
...
'SWIFT': {
'SWIFT_USERNAME': os.getenv('SWIFT_USERNAME', 'anonymous'),
'SWIFT_SHARED_SECRET': os.getenv('SWIFT_SHARED_SECRET', 'anonymous'),
},
}
If you followed the Prerequsites section above, then you have a Swift TOO username and shared secret.
(Your shared secret is not your Swift TOO account password). Set environment variables SWIFT_USERNAME
and SWIFT_SHARED_SECRET to your Swift TOO username and shared secret, respectively. (Do not check them
into any software repository).
export SWIFT_USERNAME='<your Swift TOO usename>'
export SWIFT_SHARED_SECRET='<your Swift TOO shared secret>'
The settings.FACILITIES['Swift'] configuration dictionary
above will get the values from the environment variables that you set. Your TOM will then use them to interact
with the Swift TOO API.
Release files for tom-swift 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tom_swift-0.4.1.tar.gz | 27.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tom_swift-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 55.4 kB
Release files / tom_swift-0.4.1.tar.gz
| Download URL | tom_swift-0.4.1.tar.gz |
|---|---|
| Size | 27.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b35e1320c23ebeecc89528eb2e773a920a94d66e250dde3f48c3849b1b10115
|
|
BLAKE2b-256 checksum How to use checksums |
0eadb0ec58972451286da57a484c4ce2ad205da96c91949acae5f6d116718617
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
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 Jul 16, 2026.
Transparency logRelease files / tom_swift-0.4.1-py3-none-any.whl
| Download URL | tom_swift-0.4.1-py3-none-any.whl |
|---|---|
| Size | 28.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
43a7e65c668f506b42376c589f7f4abe11c618630eaa5d84e2f524f7817012ef
|
|
BLAKE2b-256 checksum How to use checksums |
5bffda3ee8876fbbc591218e653b5f223815001c0623da275a1030a017af56c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
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 Jul 16, 2026.
Transparency log