TOM Toolkit Facility module for the Neil Gehrels Swift Observatory
Project description
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_swift
to yourINSTALLED_APPS
setting:INSTALLED_APPS = [ ... 'tom_swift', ]
-
Add
tom_swift.swift.SwiftFacility
to theTOM_FACILITY_CLASSES
in 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file tom_swift-0.3.1.tar.gz
.
File metadata
- Download URL: tom_swift-0.3.1.tar.gz
- Upload date:
- Size: 27.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5bbf4ad964905c326216d863a5fa568dc70ee96ae038bf3d1c3b784cbf1b5a7 |
|
MD5 | 3681b2eba610acc4ce217cd29e8f94a0 |
|
BLAKE2b-256 | 23e0bdaa99d974ab387f2cc51595cdd6462d9f93f0a4d608c6b6cdd95e556fa7 |
File details
Details for the file tom_swift-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: tom_swift-0.3.1-py3-none-any.whl
- Upload date:
- Size: 28.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01a75bbe882240765831bd813679a290f849bfbc72c809456227b98b3ace9f96 |
|
MD5 | 421f08fcf07dd136546180ab1a607634 |
|
BLAKE2b-256 | 0df678bfb7094fa092026af9a2ba05dd50599bd4f3decc005bf9b61fc4c4dad8 |