Skip to main content

The LSST SQuaRE framework for Roundtable bots.

Project description

Safir is the SQuaRE Framework for Roundtable

Roundtable is the SQuaRE application and bot deployment platform, hosted on Kubernetes with Argo CD. Safir is a Python package that lets you develop Roundtable bots, based on the aiohttp.web asyncio web framework.

Install from PyPI:

pip install safir

The best way to create a new Safir-based Roundtable bot is with the roundtable_aiohttp_bot template.

Read more about Safir at https://safir.lsst.io

Features

  • Set up an aiohttp.ClientSession as part of the application start up an tear-down lifecycle.

  • Set up structlog-based logging.

  • Middleware for attaching request context to the logger to include a request UUID, method, and route in all log messages.

  • Gather and structure Roundtable-standard metadata about your application.

Developing Safir

The best way to start contributing to Safir is by cloning this repository creating a virtual environment, and running the init command:

git clone https://github.com/lsst-sqre/safir.git
cd safir
make init

For details, see https://safir.lsst.io/v/dev/development.html.

Change log

0.1.0 (2020-02-26)

  • The first release of Safir featuring:

    • safir.http for adding an aiohttp.ClientSession to your application.

    • safir.logging for configuring structlog loggers.

    • safir.metadata helps your gather and structure metadata about your application for publishing on metadata endpoints.

    • safir.middleware includes a logging middleware that adds a logger with bound context about the request to your Request object.

    • Documentation about these features and a tutorial for starting a new application with the roundtable_aiohttp_bot template.

MIT License

Copyright (c) 2020 Association of Universities for Research in Astronomy, Inc. (AURA)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

safir-0.1.0rc1.tar.gz (23.3 kB view details)

Uploaded Source

Built Distribution

safir-0.1.0rc1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file safir-0.1.0rc1.tar.gz.

File metadata

  • Download URL: safir-0.1.0rc1.tar.gz
  • Upload date:
  • Size: 23.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for safir-0.1.0rc1.tar.gz
Algorithm Hash digest
SHA256 425728bf9535b0f8944e670ef4c7aff1f8260193d541e67292c769018a6afaa7
MD5 16631e080d2dd33bd4c43ffd01b91f42
BLAKE2b-256 eb8cc0bada28fbcbf366f5d00f231de2749f8f76de4a8154521b61319b33b59c

See more details on using hashes here.

File details

Details for the file safir-0.1.0rc1-py3-none-any.whl.

File metadata

  • Download URL: safir-0.1.0rc1-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for safir-0.1.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 d9d037d40cb9b5d89507de8ba6c6cd3fca0c14d7987afefd7a76f9646d6e166d
MD5 48421675a13a7773161d47815246f28c
BLAKE2b-256 c2f9d2830fdb12d59fe9eefdf7f2ced43815cc16e964d8ba278d44be55029adc

See more details on using hashes here.

Supported by

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