# 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.
Raw data
{
"_id": null,
"home_page": "https://github.com/reddit/baseplate.py",
"name": "baseplate",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8.1",
"maintainer_email": null,
"keywords": null,
"author": "reddit",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/39/06/2cdd2ba6d82e9f5dd7f76a06e068c8b546c1cd04fe29acdd8d0a4d85edea/baseplate-2.7.1.tar.gz",
"platform": null,
"description": "# baseplate.py\n\n* [Documentation](https://baseplate.readthedocs.io/en/stable/)\n* [Contribution Guidelines](https://github.com/reddit/baseplate.py/blob/develop/CONTRIBUTING.md)\n\nIt's much easier to manage a bunch of services when they all have the same\nshape: the way they're developed, the way they interact with the infrastructure\nthey run on, and the way they interact with each other. Baseplate is reddit's\nspecification for the common shape of our services. This library, Baseplate.py,\nis the Python implementation of that specification.\n\nBaseplate.py glues together tooling for interacting with the reddit backend\necosystem and spackles over things that are missing. It integrates with Apache\nThrift, Pyramid, and client libraries for many systems to transparently make\nyour applications observable.\n\nBaseplate applications transparently get:\n\n* Timing and request rate metrics using statsd\n* Distributed tracing with Zipkin\n* Error reporting and aggregation with Sentry\n\nAnd can take advantage of:\n\n* Integration with commonly used clients like: Thrift, SQLAlchemy,\n cassandra-driver, pymemcache, redis-py, and Kombu\n* Secrets securely pulled from Vault\n\nAnd many other things!\n\n# pre-commit\n\n* [Documentation](https://pre-commit.com/)\n\nThis repo comes with pre-commit hooks that let you (on a voluntary basis)\nenable pre-commit and/or pre-push hooks.\n\nConfiguration can be found at the root of the directory in\n`.pre-commit-config.yaml`. On its own, the configuration file doesn't do\nanything. You either need to [run the hooks manually](https://pre-commit.com/#pre-commit-run)\nor [install them](https://pre-commit.com/#pre-commit-install) so that they run\nautomatically on every commit or push.\n\nCurrently, we run the `make fmt` target on commit and `make lint` / `pytest`\nactions on push.\n\nSpecific hooks can be [temporarily disabled](https://pre-commit.com/#temporarily-disabling-hooks).\n\nYou can install hooks only for a specific step (i.e. [pre-push](https://pre-commit.com/#pre-commit-during-push)).\n\n## Testing in Snoodev\n\nYou can upgrade any service to use in development Baseplate code in Snoodev by\nediting the requirements file for the service you would like to use for testing.\nUpdate the the Baseplate requirement to pull from Github instead, like this:\n\n```\ndiff --git a/requirements.txt b/requirements.txt\nindex aef8ad8..d32a078 100644\n--- a/requirements.txt\n+++ b/requirements.txt\n-baseplate==2.5.7\n+git+https://github.com/reddit/baseplate.py@<ref>#egg=baseplate\n```\n\nIn this case the ref can be either a commit hash or a branch name. After making\nthis update you can check if the service works in Snoodev.\n\n> **Warning**\n> Never deploy this change to production. Production should always use a Baseplate\n> semantic version that has been tagged, and released.\n",
"bugtrack_url": null,
"license": "BSD",
"summary": "reddit's python service framework",
"version": "2.7.1",
"project_urls": {
"Documentation": "https://baseplate.readthedocs.io/en/stable/",
"Homepage": "https://github.com/reddit/baseplate.py",
"Repository": "https://github.com/reddit/baseplate.py"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4041209bbceb014e34b0d6fd9b7ecb4cb6d30fba2e4bc9616b8ce590118aefe4",
"md5": "8f4d2316318ffe4ae107296ecc0742bd",
"sha256": "24a2bc8f8a862397c3b614273807f39ee8cd629ba163b9e93a339f3bbd9b9bb5"
},
"downloads": -1,
"filename": "baseplate-2.7.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8f4d2316318ffe4ae107296ecc0742bd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8.1",
"size": 191006,
"upload_time": "2024-11-13T19:50:07",
"upload_time_iso_8601": "2024-11-13T19:50:07.765286Z",
"url": "https://files.pythonhosted.org/packages/40/41/209bbceb014e34b0d6fd9b7ecb4cb6d30fba2e4bc9616b8ce590118aefe4/baseplate-2.7.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "39062cdd2ba6d82e9f5dd7f76a06e068c8b546c1cd04fe29acdd8d0a4d85edea",
"md5": "8d6f9e7912804b529f5cce2a9e9e74b7",
"sha256": "97356d73b684759c887a69302acbca93953a6be564585ee48927a59440673a1e"
},
"downloads": -1,
"filename": "baseplate-2.7.1.tar.gz",
"has_sig": false,
"md5_digest": "8d6f9e7912804b529f5cce2a9e9e74b7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8.1",
"size": 142516,
"upload_time": "2024-11-13T19:50:09",
"upload_time_iso_8601": "2024-11-13T19:50:09.437257Z",
"url": "https://files.pythonhosted.org/packages/39/06/2cdd2ba6d82e9f5dd7f76a06e068c8b546c1cd04fe29acdd8d0a4d85edea/baseplate-2.7.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-13 19:50:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "reddit",
"github_project": "baseplate.py",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "baseplate"
}