Skip to main content

(Cosmic) Tendrils is the generic API for (cosmic) FLOWS project and pipeline.

Project description

tendrils api

Cosmic tendrils is a fully type annoted Python API wrapper for both FLOWS pipeline and project.

Currently, tendrils is reliant on the flows project webserver. However, the functionality is there for it to interface with any remote server providing an API with given URLS. all URLS can be modified in utils/urls.py to point to a different API, and tendrils can be used to interface with it.

Homepage: https://github.com/SNflows/tendrils
PYPI: https://pypi.org/project/tendrils/

installation

pip install tendrils

Requirements:

astropy, numpy, requests, tqdm
python >= 3.10

Before you begin [IMPORTANT!]

You will need to populate the included template config.ini with the right paths and flows API token. To do so, you can use the tools provided in tendrils.utils. There is:

  • a guided method that queries you in the command line for each field.
  • a function for copying from an already filled out (e.g., previous) config.ini file.
  • functions for setting each attribute separately (if you only need the API token for example)

using python shell (or ipython, or a script):

import tendrils

# Option 1
tendrils.utils.create_config()  # will also ask for location of where to store flows photometry.

# Option 2
tendrils.utils.copy_from_other_config('<path_to_other_config>')

# Option 3
# can also be called without any arguments to query for manually inputting the token.
tendrils.utils.set_api_token(token = 'my_long_token')  

After doing any of the above, your config.ini will have your API token, and all API calls will now use that token.

Dev

After cloning from the github repo, use the provided pyproject.toml file. Install using flit (pip install flit): flit install --symlink to install in EDITABLE mode. A legacy setup.py is also provided for installing with pip install -e . from the root directory. Important, do not upload you config.ini! Make sure all values are None as in the template from Pypi. We welcome all PRs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tendrils-0.3.2.tar.gz (31.7 kB view details)

Uploaded Source

Built Distribution

tendrils-0.3.2-py3-none-any.whl (35.7 kB view details)

Uploaded Python 3

File details

Details for the file tendrils-0.3.2.tar.gz.

File metadata

  • Download URL: tendrils-0.3.2.tar.gz
  • Upload date:
  • Size: 31.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.27.1

File hashes

Hashes for tendrils-0.3.2.tar.gz
Algorithm Hash digest
SHA256 41075221cfbe924b43ef45f7916097b445016fbcbd0f59ec617773f5bc5f04d2
MD5 57a2c566ec4a135d35e379b514f69979
BLAKE2b-256 7ae88923af3720be6c384ef92c80d6e9ff4acec037f5df8cf7c3fbb52176d079

See more details on using hashes here.

File details

Details for the file tendrils-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: tendrils-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 35.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.27.1

File hashes

Hashes for tendrils-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 62bdbc9957e6a4920dde8a5128e03298484b5b7e2f3541503271fa27a64c2c56
MD5 f5df40d5f54c295b91ffa877c06ae06e
BLAKE2b-256 dcb23f50b567d9db6da08cd52fe4934ea681f09c492e236753cd078fa0e4c39c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page