Metadata-Version: 2.1
Name: baseplate
Version: 2.7.0b2
Summary: reddit's python service framework
Home-page: https://github.com/reddit/baseplate.py
License: BSD
Author: reddit
Requires-Python: >=3.8.1
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: BSD License
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Provides-Extra: amqp
Provides-Extra: cassandra
Provides-Extra: cqlmapper
Provides-Extra: kafka
Provides-Extra: memcache
Provides-Extra: prometheus
Provides-Extra: psycopg2
Provides-Extra: pyramid
Provides-Extra: redis
Provides-Extra: redis-py-cluster
Provides-Extra: refcycle
Provides-Extra: requests
Provides-Extra: s3fetcher
Provides-Extra: sentry
Provides-Extra: sql
Provides-Extra: zookeeper
Requires-Dist: advocate (>=1.0.0,<2.0) ; extra == "requests"
Requires-Dist: boto3 (>=1.28.27)
Requires-Dist: cassandra-driver (>=3.29.0,<4.0) ; extra == "cassandra"
Requires-Dist: confluent-kafka (>=2.3.0) ; extra == "kafka"
Requires-Dist: gevent (>=23.9.1)
Requires-Dist: kazoo (>=2.5.0,<3.0) ; extra == "zookeeper"
Requires-Dist: kombu (>=5.3.3) ; extra == "amqp"
Requires-Dist: objgraph (>=3.6.0) ; extra == "refcycle"
Requires-Dist: posix-ipc (>=1.0.0,<2.0)
Requires-Dist: prometheus-client (>=0.12.0)
Requires-Dist: psycogreen (>=1.0.0,<2.0.0) ; extra == "psycopg2"
Requires-Dist: psycopg2 (>=2.0.0,<3.0.0) ; extra == "psycopg2"
Requires-Dist: pymemcache (>=1.3.0,<1.4.4) ; extra == "memcache"
Requires-Dist: pyramid (>=1.10.8,<2.0) ; extra == "pyramid"
Requires-Dist: python-json-logger (>=2.0.5,<3.0)
Requires-Dist: reddit-cqlmapper (>=0.3.0,<1.0) ; extra == "cqlmapper"
Requires-Dist: redis (>=2.10.0,<4.0.0) ; extra == "redis"
Requires-Dist: redis-py-cluster (>=2.1.2,<3.0.0) ; extra == "redis-py-cluster"
Requires-Dist: requests (>=2.21.0,<3.0)
Requires-Dist: sentry-sdk (>=1.35.0,<2.0) ; extra == "sentry"
Requires-Dist: sqlalchemy (>=1.4.49,<2) ; extra == "sql"
Requires-Dist: thrift-unofficial (>=0.19.0,<1.0)
Requires-Dist: typing-extensions (>=4.11.0,<5.0.0)
Project-URL: Documentation, https://baseplate.readthedocs.io/en/stable/
Project-URL: Repository, https://github.com/reddit/baseplate.py
Description-Content-Type: text/markdown

# baseplate.py

* [Documentation](https://baseplate.readthedocs.io/en/stable/)
* [Contribution Guidelines](https://github.com/reddit/baseplate.py/blob/develop/CONTRIBUTING.md)

It's much easier to manage a bunch of services when they all have the same
shape: the way they're developed, the way they interact with the infrastructure
they run on, and the way they interact with each other. Baseplate is reddit's
specification for the common shape of our services. This library, Baseplate.py,
is the Python implementation of that specification.

Baseplate.py glues together tooling for interacting with the reddit backend
ecosystem and spackles over things that are missing. It integrates with Apache
Thrift, Pyramid, and client libraries for many systems to transparently make
your applications observable.

Baseplate applications transparently get:

* Timing and request rate metrics using statsd
* Distributed tracing with Zipkin
* Error reporting and aggregation with Sentry

And can take advantage of:

* Integration with commonly used clients like: Thrift, SQLAlchemy,
  cassandra-driver, pymemcache, redis-py, and Kombu
* Secrets securely pulled from Vault

And many other things!

# pre-commit

* [Documentation](https://pre-commit.com/)

This repo comes with pre-commit hooks that let you (on a voluntary basis)
enable pre-commit and/or pre-push hooks.

Configuration can be found at the root of the directory in
`.pre-commit-config.yaml`. On its own, the configuration file doesn't do
anything. You either need to [run the hooks manually](https://pre-commit.com/#pre-commit-run)
or [install them](https://pre-commit.com/#pre-commit-install) so that they run
automatically on every commit or push.

Currently, we run the `make fmt` target on commit and `make lint` / `pytest`
actions on push.

Specific hooks can be [temporarily disabled](https://pre-commit.com/#temporarily-disabling-hooks).

You can install hooks only for a specific step (i.e. [pre-push](https://pre-commit.com/#pre-commit-during-push)).

## Testing in Snoodev

You can upgrade any service to use in development Baseplate code in Snoodev by
editing the requirements file for the service you would like to use for testing.
Update the the Baseplate requirement to pull from Github instead, like this:

```
diff --git a/requirements.txt b/requirements.txt
index aef8ad8..d32a078 100644
--- a/requirements.txt
+++ b/requirements.txt
-baseplate==2.5.7
+git+https://github.com/reddit/baseplate.py@<ref>#egg=baseplate
```

In this case the ref can be either a commit hash or a branch name. After making
this update you can check if the service works in Snoodev.

> **Warning**
> Never deploy this change to production. Production should always use a Baseplate
> semantic version that has been tagged, and released.

