Giter VIP home page Giter VIP logo

baseplate.py's Introduction

baseplate.py

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

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 or install them 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.

You can install hooks only for a specific step (i.e. pre-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.

baseplate.py's People

Contributors

spladug avatar pacejackson avatar ckwang8128 avatar xaelias avatar kaitaan avatar dependabot[bot] avatar bsimpson63 avatar nsheaps avatar bradengroom avatar fishy avatar ktatkinson avatar krav avatar cshoe avatar roganmurley avatar ghirsch-reddit avatar praxist avatar diffyqgirl avatar curioussavage avatar foreverest avatar rram avatar alienth avatar superq avatar dwick avatar manishapme avatar markis avatar nataliest avatar kylelemons avatar jerroydmoore avatar jennlam avatar ethverie avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.