{"id":19486240,"url":"https://github.com/textbook/flash_services","last_synced_at":"2026-05-17T05:33:28.949Z","repository":{"id":45948218,"uuid":"56456343","full_name":"textbook/flash_services","owner":"textbook","description":"The services that can be shown on a Flash dashboard.","archived":false,"fork":false,"pushed_at":"2023-02-16T04:40:22.000Z","size":162,"stargazers_count":2,"open_issues_count":7,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-08T07:52:16.955Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/textbook/flash","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/textbook.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-17T20:15:32.000Z","updated_at":"2021-11-25T11:06:56.000Z","dependencies_parsed_at":"2024-11-10T20:47:36.679Z","dependency_job_id":null,"html_url":"https://github.com/textbook/flash_services","commit_stats":null,"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textbook%2Fflash_services","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textbook%2Fflash_services/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textbook%2Fflash_services/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textbook%2Fflash_services/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/textbook","download_url":"https://codeload.github.com/textbook/flash_services/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240723393,"owners_count":19847272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T20:35:57.737Z","updated_at":"2026-05-17T05:33:23.929Z","avatar_url":"https://github.com/textbook.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Flash Services\n--------------\n\n.. image:: https://img.shields.io/pypi/v/flash_services.svg\n  :target: https://pypi.python.org/pypi/flash_services\n  :alt: PyPI Version\n\n.. image:: https://readthedocs.org/projects/flash-services/badge/?version=latest\n  :target: https://flash-services.readthedocs.io/en/latest/?badge=latest\n  :alt: Documentation Status\n\n.. image:: https://github.com/textbook/flash_services/actions/workflows/push.yml/badge.svg\n  :target: https://github.com/textbook/flash_services/actions/workflows/push.yml\n  :alt: GitHub Actions Build Status\n\n.. image:: https://coveralls.io/repos/github/textbook/flash_services/badge.svg?branch=master\n  :target: https://coveralls.io/github/textbook/flash_services?branch=master\n  :alt: Test Coverage\n\n.. image:: https://api.codacy.com/project/badge/grade/c20159586c524b108e17609d11a88688\n  :target: https://www.codacy.com/app/j-r-sharpe-github/flash_services\n  :alt: Other Code Issues\n\n.. image:: https://img.shields.io/badge/license-ISC-blue.svg\n  :target: https://github.com/textbook/flash_services/blob/master/LICENSE\n  :alt: ISC License\n\nThe services that can be shown on a `Flash`_ dashboard. Includes the service\nupdate code and any custom templates not available in the core Flash package.\n\nDocumentation\n=============\n\nDocumentation is available on `Read the Docs`_.\n\nAvailable services\n==================\n\nThe following service definitions include the configuration options:\n\n* ``buddy`` - for CI builds on `Buddy`_\n\n  * ``api_token`` (required - a valid token for the Buddy API)\n  * ``domain`` (required - the domain of the Buddy project)\n  * ``pipeline_id`` (required - the ID of the Buddy pipeline)\n  * ``project_name`` (required - the name of the Buddy project)\n\n* ``circleci`` - for CI builds on `CircleCI`_\n\n  * ``api_token`` (required - a valid token for the Circle CI API)\n  * ``vcs_type`` (required - the name of the service the project is accessed\n    via, e.g. ``'github'``)\n  * ``username`` (required - the name of the account the project is in, e.g.\n    ``\"textbook\"``)\n  * ``project`` (required - the name of the project repository within that\n    account, e.g. ``\"flash\"``)\n  * ``branch`` (required - the name of the branch to show builds from, e.g.\n    ``\"main\"``)\n\n* ``codeship`` - for CI builds on `Codeship`_\n\n  * ``api_token`` (required)\n  * ``project_id`` (required)\n\n* ``coveralls`` - for coverage reporting on `Coveralls`_ (currently only\n  supports open-source builds)\n\n  * ``vcs_name`` (required - the name of the service the project is accessed\n    via, e.g. ``'github'``)\n  * ``account`` (required - the name of the account the project is in, e.g.\n    ``\"textbook\"``)\n  * ``repo`` (required - the name of the project repository within that account,\n    e.g. ``\"flash\"``)\n  * ``ok_threshold`` (the minimum coverage level to show as an OK state,\n    defaults to 80%)\n  * ``neutral_threshold`` (the minimum coverage level to show as a neutral\n    state, defaults to 50%)\n\n* ``gh_issues`` - for issues and PRs in project repositories on `GitHub`_\n\n  * ``password`` (required - a GitHub API token)\n  * ``username`` (required - the username for the token)\n  * ``account`` (required - the name of the account the project is in, e.g.\n    ``\"textbook\"``)\n  * ``repo`` (required - the name of the project repository within that account,\n    e.g. ``\"flash\"``)\n  * ``neutral_threshold`` (the maximum half life to show as a neutral state,\n    in days, defaults to 30)\n  * ``ok_threshold`` (the maximum half life to show as an OK state, in days,\n    defaults to 7)\n\n* ``ghe_issues`` - for issues and PRs in project repositories on\n  `GitHub Enterprise`_ installations\n\n  * ``root`` (required - the root URL for the enterprise API)\n  * ``password`` (required - a GitHub API token)\n  * ``username`` (required - the username for the token)\n  * ``account`` (required - the name of the account the project is in, e.g.\n    ``\"textbook\"``)\n  * ``repo`` (required - the name of the project repository within that account,\n    e.g. ``\"flash\"``)\n  * ``neutral_threshold`` (the maximum half life to show as a neutral state,\n    in days, defaults to 30)\n  * ``ok_threshold`` (the maximum half life to show as an OK state, in days,\n    defaults to 7)\n\n* ``gh_actions`` - for Actions in project repositories on `GitHub`_\n\n  * ``password`` (required - a GitHub API token)\n  * ``username`` (required - the username for the token)\n  * ``account`` (required - the name of the account the project is in, e.g.\n    ``\"textbook\"``)\n  * ``repo`` (required - the name of the project repository within that account,\n    e.g. ``\"flash\"``)\n\n* ``ghe_actions`` - for Actions in project repositories on `GitHub Enterprise`_\n  installations\n\n  * ``root`` (required - the root URL for the enterprise API)\n  * ``password`` (required - a GitHub API token)\n  * ``username`` (required - the username for the token)\n  * ``account`` (required - the name of the account the project is in, e.g.\n    ``\"textbook\"``)\n  * ``repo`` (required - the name of the project repository within that account,\n    e.g. ``\"flash\"``)\n\n* ``github`` - for project repositories on `GitHub`_\n\n  * ``password`` (required - a GitHub API token)\n  * ``username`` (required - the username for the token)\n  * ``account`` (required - the name of the account the project is in, e.g.\n    ``\"textbook\"``)\n  * ``repo`` (required - the name of the project repository within that account,\n    e.g. ``\"flash\"``)\n  * ``branch`` (the name of the branch to show commits from, defaulting to the\n    repository's default branch, which is usually ``master``)\n\n* ``github_enterprise`` - for project repositories on `GitHub Enterprise`_\n  installations\n\n  * ``root`` (required - the root URL for the enterprise API)\n  * ``password`` (required - a GitHub API token)\n  * ``username`` (required - the username for the token)\n  * ``account`` (required - the name of the account the project is in, e.g.\n    ``\"textbook\"``)\n  * ``repo`` (required - the name of the project repository within that account,\n    e.g. ``\"flash\"``)\n  * ``branch`` (the name of the branch to show commits from, defaulting to the\n    repository's default branch, which is usually ``master``)\n\n* ``jenkins`` - for CI builds on `Jenkins`_ instances.\n\n  * ``username`` (required)\n  * ``password`` (required)\n  * ``root`` (required - the root URL for the Jenkins instance)\n  * ``job`` (required - the name of the job, which must match the job URL)\n\n* ``tracker`` - for projects on `Pivotal Tracker`_\n\n  * ``api_token`` (required)\n  * ``project_id`` (required)\n\n* ``travis`` - for public CI builds on `Travis CI (.org)`_.\n\n  * ``account`` (required)\n  * ``app`` (required)\n\n* ``travis_pro`` - for private CI builds on `Travis CI (.com)`_\n\n  * ``account`` (required)\n  * ``api_token`` (required - see `Travis API docs`_ for details)\n  * ``app`` (required)\n\nWriting a service\n=================\n\nThe idea behind this package is to make it easier to add new service providers\nto Flash. Each new service should subclass ``Service`` (or one of its more\nspecific children, where appropriate) from the ``core.py`` file. The mix-in\nclasses in ``auth.py`` can be used to implement authentication to the service\nAPI endpoint as needed (currently both header and query parameter token\nvalidation are supported).\n\n* Create a new ``Service`` subclass, or use one of the pre-provided\n  subclasses for continuous integration or version control systems;\n\n* Use the mix-ins from ``auth.py`` and ``core.py`` to add any required\n  authentication, custom root setting and/or health thresholds;\n\n* Define the ``ROOT`` service URL (used for all requests) and ``ENDPOINT``\n  URL template (which will be filled in with attributes defined on the service\n  instance) - for many cases, the default ``update`` implementation will do\n  what you need it to based on these;\n\n* Define any additional ``REQUIRED`` configuration parameters on the class\n  (note that ``__init__`` keyword arguments without default values and any\n  required parameters defined in superclasses will be added automatically);\n\n* Define any ``PROVIDED`` configuration parameters (i.e. those that other\n  classes require that your class provides - see ``BasicAuthHeaderMixin`` for\n  an example);\n\n* Set the appropriate ``TEMPLATE`` for it (if not a standard template, add it\n  to ``templates/partials`` - use the `Jinja2`_ templating language), and note\n  that the service data will be exposed to the template as ``service_data``\n  for the initial load data binding and for clients without JavaScript;\n\n* Set the ``FRIENDLY_NAME``, for display in the top-left of each pane, if not\n  the same as the class name;\n\n* Register the service in **both** ``SERVICES`` objects, using the same key:\n\n  * in Python (``__init__.py``); and\n  * in JavaScript (``static/scripts/services.js``, where any service-specific\n    client-side behaviour should also be placed).\n\n.. _Buddy: https://buddy.works/\n.. _CircleCI: https://circleci.com/\n.. _Codeship: https://codeship.com/\n.. _Coveralls: https://coveralls.io/\n.. _Flash: https://github.com/textbook/flash\n.. _GitHub: https://github.com/\n.. _GitHub Enterprise: https://enterprise.github.com/home\n.. _Jenkins: https://jenkins.io/\n.. _Jinja2: http://jinja.pocoo.org/\n.. _Pivotal Tracker: https://www.pivotaltracker.com/\n.. _Read the Docs: https://flash-services.readthedocs.io/en/latest/\n.. _Travis API docs: https://docs.travis-ci.com/api?shell#authentication\n.. _Travis CI (.org): https://travis-ci.org/\n.. _Travis CI (.com): https://travis-ci.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftextbook%2Fflash_services","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftextbook%2Fflash_services","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftextbook%2Fflash_services/lists"}