summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-12 05:42:41 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-12 05:42:41 +0000
commit97c3ceeb3f859861c44f9ab1072d9e4955d5f2f6 (patch)
treef323f29e56d84caef7d11f9060cdea3a2287cd26
parent76d0d48d3df51f9cc768a80ea3c6c71a480196c8 (diff)
automatic import of python-statshog
-rw-r--r--.gitignore1
-rw-r--r--python-statshog.spec252
-rw-r--r--sources1
3 files changed, 254 insertions, 0 deletions
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](<http://etsy.com>)'s
+[StatsD](<https://github.com/etsy/statsd>) server and
+[InfluxDB's](<http://influxdb.com>)
+[Telegraf](<https://github.com/influxdb/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: <https://github.com/macobo/statshog>
+License: MIT; see LICENSE file
+Issues: <https://github.com/macobo/statshog/issues>
+Documentation: <https://statshog.readthedocs.io/>
+# 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](<https://github.com/django-statsd/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](<http://etsy.com>)'s
+[StatsD](<https://github.com/etsy/statsd>) server and
+[InfluxDB's](<http://influxdb.com>)
+[Telegraf](<https://github.com/influxdb/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: <https://github.com/macobo/statshog>
+License: MIT; see LICENSE file
+Issues: <https://github.com/macobo/statshog/issues>
+Documentation: <https://statshog.readthedocs.io/>
+# 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](<https://github.com/django-statsd/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](<http://etsy.com>)'s
+[StatsD](<https://github.com/etsy/statsd>) server and
+[InfluxDB's](<http://influxdb.com>)
+[Telegraf](<https://github.com/influxdb/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: <https://github.com/macobo/statshog>
+License: MIT; see LICENSE file
+Issues: <https://github.com/macobo/statshog/issues>
+Documentation: <https://statshog.readthedocs.io/>
+# 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](<https://github.com/django-statsd/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 <Python_Bot@openeuler.org> - 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