-
Notifications
You must be signed in to change notification settings - Fork 27
/
setup.py
209 lines (184 loc) · 6.7 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
#!/usr/bin/env python
#
# Copyright (c) 2015-2021 Canonical, Ltd.
#
# This file is part of Talisker
# (see http://github.com/canonical-ols/talisker).
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
#
# Note: this file is autogenerated from setup.cfg for older setuptools
#
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
DESCRIPTION = '''
===========================================
Talisker - an opinionated WSGI app platform
===========================================
.. image:: https://img.shields.io/pypi/v/talisker.svg
:target: https://pypi.python.org/pypi/talisker
.. image:: https://img.shields.io/travis/canonical-ols/talisker.svg
:target: https://travis-ci.org/canonical-ols/talisker
.. image:: https://readthedocs.org/projects/talisker/badge/?version=latest
:target: https://readthedocs.org/projects/talisker/?badge=latest
:alt: Documentation Status
Talisker is an enhanced runtime for your WSGI application that aims to provide
a common operational platform for your python microservices.
It integrates with many standard python libraries to give you out-of-the-box
logging, metrics, error reporting, status urls and more.
Python version support
----------------------
Talisker 0.20.0 was the last to support Python 2.7.
Talisker version >=0.21.0 only supports Python 3.x, as
they come with Ubuntu LTS releases.
Quick Start
-----------
Simply install Talisker with Gunicorn via pip::
pip install talisker[gunicorn]
And then run your WSGI app with Talisker (as if it was regular gunicorn).::
talisker.gunicorn app:wsgi -c config.py ...
This gives you 80% of the benefits of Talisker: structured logging, metrics,
sentry error handling, standardised status endpoints and more.
Note: right now, Talisker has extensive support for running with Gunicorn, with
more WSGI server support planned.
Elevator Pitch
--------------
Talisker integrates and configures standard python libraries into a single
tool, useful in both development and production. It provides:
- structured logging for stdlib logging module (with grok filter)
- gunicorn as a wsgi runner
- request id tracing
- standard status endpoints
- statsd/prometheus metrics for incoming/outgoing http requests and more.
- deep sentry integration
It also optionally supports the same level of logging/metrics/sentry
integration for:
- celery workers
- general python scripts, like cron jobs or management tasks.
Talisker is opinionated, and designed to be simple to use. As such, it is not
currently very configurable. However, PR's are very welcome!
For more information, see The Documentation, which should be found at:
https://talisker.readthedocs.io
'''
setup(
author='Simon Davy',
author_email='[email protected]',
classifiers=[
'License :: OSI Approved :: Apache Software License',
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Natural Language :: English',
'Topic :: Internet :: WWW/HTTP :: WSGI',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware',
'Topic :: System :: Logging',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation :: CPython',
],
description='A common WSGI stack',
entry_points=dict(
console_scripts=[
'talisker=talisker:run_gunicorn[gunicorn]',
'talisker.run=talisker:run',
'talisker.gunicorn=talisker:run_gunicorn[gunicorn]',
'talisker.gunicorn.eventlet=talisker:run_gunicorn_eventlet[gunicorn]',
'talisker.gunicorn.gevent=talisker:run_gunicorn_gevent[gunicorn]',
'talisker.celery=talisker:run_celery[celery]',
'talisker.help=talisker:run_help',
],
),
extras_require=dict(
asyncio=[
'aiocontextvars==0.2.2;python_version>="3.5.3" and python_version<"3.7"',
],
celery=[
'celery~=4.4;python_version~="3.5.0"',
'celery>=4;python_version>"3.5"',
],
dev=[
'logging_tree>=1.9',
'pygments>=2.11',
'psutil>=5.9',
'objgraph>=3.5',
],
django=[
'django~=2.2;python_version~="3.5.0"',
'django<5;python_version>"3.5"',
],
flask=[
'flask~=1.1;python_version~="3.5.0"',
'flask<3;python_version>"3.5"',
'blinker~=1.5;python_version~="3.5.0"',
'blinker<2;python_version>"3.5"',
],
gevent=[
'gevent>=20.9.0',
],
gunicorn=[
'gunicorn>=19.7.0;python_version>"3.6"',
'gunicorn>=19.7.0,<21.0;python_version>="3.5" and python_version<"3.8"',
],
pg=[
'sqlparse>=0.4.2',
'psycopg2>=2.8,<3.0',
],
prometheus=[
'prometheus-client~=0.7.0;python_version~="3.5.0"',
'prometheus-client<0.8;python_version>"3.5"',
],
raven=[
'raven>=6.4.0',
],
),
include_package_data=True,
install_requires=[
'Werkzeug~=1.0;python_version~="3.5.0"',
'Werkzeug<3;python_version>="3.6"',
'statsd~=3.3;python_version~="3.5.0"',
'statsd<4;python_version>="3.6"',
'requests~=2.25;python_version~="3.5.0"',
'requests<3.0;python_version>"3.5"',
'contextvars~=2.4;python_version>="3.5" and python_version<"3.7"',
],
keywords=[
'talisker',
],
long_description=DESCRIPTION,
name='talisker',
package_data=dict(
talisker=[
'logstash/*',
],
),
package_dir=dict(
talisker='talisker',
),
packages=[
'talisker',
],
test_suite='tests',
url='https://github.com/canonical-ols/talisker',
version='0.21.5',
zip_safe=False,
)