commit e59d73751284fd9cd404776afcf00ae8721ef023 Author: Théophile Bastian Date: Sun Jun 20 13:28:51 2021 +0200 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7f7cccc --- /dev/null +++ b/.gitignore @@ -0,0 +1,60 @@ +# ---> Python +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..21e5691 --- /dev/null +++ b/LICENSE @@ -0,0 +1,8 @@ +MIT License +Copyright (c) + +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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..69b0c35 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# Arkose-prometheus + +Plugs [Arkose](https://arkose.com) blockparks' COVID occupation gauges into +Prometheus diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..37060f2 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +prometheus-client==0.11.* +aiohttp diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..51afb04 --- /dev/null +++ b/setup.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 + +from setuptools import setup, find_packages + + +def parse_requirements(): + reqs = [] + with open("requirements.txt", "r") as handle: + for line in handle: + reqs.append(line) + return reqs + + +setup( + name="arkose_prometheus", + version="0.1", + description="Plug arkose occupation gauges into Prometheus", + author="tobast", + author_email="contact@tobast.fr", + license="LICENSE", + url="https://git.tobast.fr/tobast/arkose_prometheus", + packages=find_packages(), + include_package_data=True, + long_description=open("README.md").read(), + install_requires=parse_requirements(), + entry_points={ + "console_scripts": [ + ("prometheus-arkose = arkose_prometheus:main"), + ] + }, +)