Skip to main content

Transient Name Server (TNS) Report and Classification plugin for TOM Toolkit

TOMtoolkit module for reporting transients to the TNS

Installation

  1. Install the package into your TOM environment:

    pip install tom-tns
    
  2. In your project settings.py, add tom_tns to your INSTALLED_APPS setting:

    INSTALLED_APPS = TOMTOOKIT_INSTALLED_APPS + [
    'custom_code',
    ...
    'tom_TNS',

    ]
  1. Add TNS account credentials to your settings.py to enable TNS submission.

    If you don't have access to a TNS Bot for your TOM, you can make one from the TNS website.

    NOTE: If you are testing on the sandbox, the sandbox is only synced every Sunday, so new bots created using the above link won't show up until after the next update.

    Submit to TNS directly

    Add your TNS credentials to your settings.py if they don't already exist for the TNS Data Service.

     DATA_SERVICES = {
         ...
         'TNS': {
             'bot_id': os.getenv('TNS_BOT_ID', ''),  # This is the BOT ID you plan to use to submit to TNS
             'bot_name': os.getenv('TNS_BOT_NAME', ''),  # This is the BOT name associated with the above ID
             'api_key': os.getenv('TNS_API_KEY', ''),  # This is the API key for the associated BOT         
             'base_url': 'https://sandbox.wis-tns.org/',  # This is the sandbox URL. Use https://www.wis-tns.org/ for live submission.
             'group_names': ['bot_group', 'PI_group'],  # Mandatory. You must choose an affiliated Group Name when reporting.
             'internal_name_format': {
                'prefix': 'MyProgramName',
                'year_format': 'YY',
                'postfix': ''
             },  # Optional formatting for internal name used by default if no specific name is given. (ex. MyProgramName24xxx for TNS object 2024xxx)
             'filter_mapping': {
                 'o': 'Other',
                 'c': 'Clear',
                 ...
             },  # Optional mapping from your photometry filter values to TNS filter options.
             'instrument_mapping': {
                 'fa20': 'LCO1m - Sinistro',
                 ...
             },  # Optional mapping from your reduced datum instrument name to TNS instrument names
             'default_authors': 'Foo Bar <foo@bar.com>, Rando Calrissian, et al.',  # Optional default authors string to populate the author fields for tns submission. If not specified, defaults to saying "<logged in user> using <tom name>".
             'report_max_attempts': 10,  # Optional max number of attempts to make to retrieve a report after submission (Defaults o 10)
             'report_delay_seconds': None, # Optional number of seconds to wait per attempt to retrieve a report (Scales up linearly by default)
         },
     }
    

Once configured, a TNS button should appear below the Target Name on the default Target Detail page.

Release files for tom-tns 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tom-tns 0.5.0
File Size Uploaded
tom_tns-0.5.0.tar.gz 29.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tom-tns 0.5.0
File Interpreter ABI Platform
tom_tns-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 63.2 kB

Release files / tom_tns-0.5.0.tar.gz

Download URL tom_tns-0.5.0.tar.gz
Size 29.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2fdb7e9df226525aa768c8bf5c830398f5096e84dc3d2fb685e441db4bbb73da
BLAKE2b-256 checksum
How to use checksums
3abdbd80f89a6be8107a4d55b255bd172f44f9421d8ef117aa44c27a3b0291a5
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

Release files / tom_tns-0.5.0-py3-none-any.whl

Download URL tom_tns-0.5.0-py3-none-any.whl
Size 33.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47c55032d66671f226c80ec4ed4860da5e66ae9c8a76a1ea52a72e780c66f78a
BLAKE2b-256 checksum
How to use checksums
508b8a636c0b1dc137af48c0a9a623ed4e3d15a907b7890ecb2b641b60a4340a
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

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.0

2 release files

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