From 97c3ceeb3f859861c44f9ab1072d9e4955d5f2f6 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 12 Apr 2023 05:42:41 +0000 Subject: automatic import of python-statshog --- .gitignore | 1 + python-statshog.spec | 252 +++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 254 insertions(+) create mode 100644 python-statshog.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..121ade0 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/statshog-1.0.6.tar.gz diff --git a/python-statshog.spec b/python-statshog.spec new file mode 100644 index 0000000..871df69 --- /dev/null +++ b/python-statshog.spec @@ -0,0 +1,252 @@ +%global _empty_manifest_terminate_build 0 +Name: python-statshog +Version: 1.0.6 +Release: 1 +Summary: A simple statsd client. +License: MIT +URL: https://github.com/macobo/statshog +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/b3/88/20ee9ac030520c2817f93e545005b631283be05f990ae415c444beb52792/statshog-1.0.6.tar.gz +BuildArch: noarch + + +%description +A python client for [Etsy]()'s +[StatsD]() server and +[InfluxDB's]() +[Telegraf]() StatsD server. +[![Latest release](https://img.shields.io/pypi/v/statshog.svg)](https://pypi.python.org/pypi/statshog/) +[![Supported Python versions](https://img.shields.io/pypi/pyversions/statshog.svg)](https://pypi.python.org/pypi/statshog/) +[![Wheel Status](https://img.shields.io/pypi/wheel/statshog.svg)](https://pypi.python.org/pypi/statshog/) +Code: +License: MIT; see LICENSE file +Issues: +Documentation: +# Install +The easiest way to install statsd is with pip! +You can install from PyPI: +```bash +pip install statshog +``` +Or GitHub: +```bash +$ pip install -e git+https://github.com/macobo/statshog#egg=statshog +``` +Or from source: +```bash +git clone https://github.com/macobo/statshog +cd pystatsd +python setup.py install +``` +# Usage +## Quick usage +```python +import statshog +statsd = statshog.StatsClient(host='localhost', port=8125) +statsd.incr('foo') # Increment the 'foo' counter. +statsd.timing('stats.timed', 320) # Record a 320ms 'stats.timed' +``` +## Using with telegraf/influxdb +```python +import statshog +statsd = statshog.StatsClient(telegraf=True) +statsd.timing('stats.timed', 320, tags={"mytag": 456}) +``` +## Usage with django +Update your settings.py to have the following values if using non-defaults: +- `STATSD_HOST` (default: `'localhost'`) +- `STATSD_PORT` (default: `8125`) +- `STATSD_PREFIX` (default: `None`) +- `STATSD_MAXUDPSIZE` (default: `512`) +- `STATSD_IPV6` (default: `False`) +- `STATSD_TELEGRAF` (default: `False`) +- `STATSD_SEPARATOR` (default: `'.'`) +Then, you can use statshog as following: +```python +from statshog.defaults.django import statsd +statsd.timing('stats.timed', 320) +``` +To use together with +[django-statsd](), also add +the following to your `settings.py`: +```python +STATSD_CLIENT = "statshog" +``` + +%package -n python3-statshog +Summary: A simple statsd client. +Provides: python-statshog +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-statshog +A python client for [Etsy]()'s +[StatsD]() server and +[InfluxDB's]() +[Telegraf]() StatsD server. +[![Latest release](https://img.shields.io/pypi/v/statshog.svg)](https://pypi.python.org/pypi/statshog/) +[![Supported Python versions](https://img.shields.io/pypi/pyversions/statshog.svg)](https://pypi.python.org/pypi/statshog/) +[![Wheel Status](https://img.shields.io/pypi/wheel/statshog.svg)](https://pypi.python.org/pypi/statshog/) +Code: +License: MIT; see LICENSE file +Issues: +Documentation: +# Install +The easiest way to install statsd is with pip! +You can install from PyPI: +```bash +pip install statshog +``` +Or GitHub: +```bash +$ pip install -e git+https://github.com/macobo/statshog#egg=statshog +``` +Or from source: +```bash +git clone https://github.com/macobo/statshog +cd pystatsd +python setup.py install +``` +# Usage +## Quick usage +```python +import statshog +statsd = statshog.StatsClient(host='localhost', port=8125) +statsd.incr('foo') # Increment the 'foo' counter. +statsd.timing('stats.timed', 320) # Record a 320ms 'stats.timed' +``` +## Using with telegraf/influxdb +```python +import statshog +statsd = statshog.StatsClient(telegraf=True) +statsd.timing('stats.timed', 320, tags={"mytag": 456}) +``` +## Usage with django +Update your settings.py to have the following values if using non-defaults: +- `STATSD_HOST` (default: `'localhost'`) +- `STATSD_PORT` (default: `8125`) +- `STATSD_PREFIX` (default: `None`) +- `STATSD_MAXUDPSIZE` (default: `512`) +- `STATSD_IPV6` (default: `False`) +- `STATSD_TELEGRAF` (default: `False`) +- `STATSD_SEPARATOR` (default: `'.'`) +Then, you can use statshog as following: +```python +from statshog.defaults.django import statsd +statsd.timing('stats.timed', 320) +``` +To use together with +[django-statsd](), also add +the following to your `settings.py`: +```python +STATSD_CLIENT = "statshog" +``` + +%package help +Summary: Development documents and examples for statshog +Provides: python3-statshog-doc +%description help +A python client for [Etsy]()'s +[StatsD]() server and +[InfluxDB's]() +[Telegraf]() StatsD server. +[![Latest release](https://img.shields.io/pypi/v/statshog.svg)](https://pypi.python.org/pypi/statshog/) +[![Supported Python versions](https://img.shields.io/pypi/pyversions/statshog.svg)](https://pypi.python.org/pypi/statshog/) +[![Wheel Status](https://img.shields.io/pypi/wheel/statshog.svg)](https://pypi.python.org/pypi/statshog/) +Code: +License: MIT; see LICENSE file +Issues: +Documentation: +# Install +The easiest way to install statsd is with pip! +You can install from PyPI: +```bash +pip install statshog +``` +Or GitHub: +```bash +$ pip install -e git+https://github.com/macobo/statshog#egg=statshog +``` +Or from source: +```bash +git clone https://github.com/macobo/statshog +cd pystatsd +python setup.py install +``` +# Usage +## Quick usage +```python +import statshog +statsd = statshog.StatsClient(host='localhost', port=8125) +statsd.incr('foo') # Increment the 'foo' counter. +statsd.timing('stats.timed', 320) # Record a 320ms 'stats.timed' +``` +## Using with telegraf/influxdb +```python +import statshog +statsd = statshog.StatsClient(telegraf=True) +statsd.timing('stats.timed', 320, tags={"mytag": 456}) +``` +## Usage with django +Update your settings.py to have the following values if using non-defaults: +- `STATSD_HOST` (default: `'localhost'`) +- `STATSD_PORT` (default: `8125`) +- `STATSD_PREFIX` (default: `None`) +- `STATSD_MAXUDPSIZE` (default: `512`) +- `STATSD_IPV6` (default: `False`) +- `STATSD_TELEGRAF` (default: `False`) +- `STATSD_SEPARATOR` (default: `'.'`) +Then, you can use statshog as following: +```python +from statshog.defaults.django import statsd +statsd.timing('stats.timed', 320) +``` +To use together with +[django-statsd](), also add +the following to your `settings.py`: +```python +STATSD_CLIENT = "statshog" +``` + +%prep +%autosetup -n statshog-1.0.6 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-statshog -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed Apr 12 2023 Python_Bot - 1.0.6-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..332ce13 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +bff27e2c4021446236baa8e39d477fd7 statshog-1.0.6.tar.gz -- cgit v1.2.3