https://github.com/rackerlabs/simpl
common python libraries :point_right: https://simpl.readthedocs.org
https://github.com/rackerlabs/simpl
Last synced: 4 months ago
JSON representation
common python libraries :point_right: https://simpl.readthedocs.org
- Host: GitHub
- URL: https://github.com/rackerlabs/simpl
- Owner: rackerlabs
- License: apache-2.0
- Created: 2015-03-12T16:56:55.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2023-08-14T21:37:03.000Z (almost 3 years ago)
- Last Synced: 2026-02-11T02:28:44.819Z (5 months ago)
- Language: Python
- Homepage:
- Size: 609 KB
- Stars: 6
- Watchers: 14
- Forks: 9
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# simpl
[](https://travis-ci.org/rackerlabs/simpl)
[](https://coveralls.io/r/checkmate/simpl?branch=master)
Common Python libraries for:
- [Configuration](#config)
- [Logging](#logging)
- [Secrets](#secrets)
- [Python Utilites](#python)
- [Servers](#server)
- [WSGI Middleware](#middleware)
- [REST API Tooling](#rest)
- [Date/Time (chronos)](#chronos)
- [MongoDB Backend Wrapper](#mongo)
Supports argparse-like configuration options with support for the following
configuration methods:
- command-line arguments
- environment variables
- keychain (OSX) and keyring (Linux)
- ini/config files
Encapsulates logging boilerplate code to initialize logging using the
[config](#config) module.
Helpers for managing sensitive values.
Code we wished was built in to python (or was simpler to use):
- dictionary and list merging
- dictionary get/set/in by path
- Perform standard webserver configuration (address, port, server adapter, etc.) using the [config](#config) module
- Run the bottle-based webservice using this configuration
Includes sample middleware for use with WSGI apps including bottle.
Middleware included:
- CORS: handles CORS requests
- Context: handles setting a threadlocal context and adds a transaction ID.
- Errors: handles catching and formatting errors
Helper code for handling RESTful APIs using bottle.
Code included:
- body: a decorator that parses a call body and passes it to a route as an argument. The decorator can apply a schema (any callable including a voluptuous.Schema), return a default, and enforce that a body is required.
- paginated: a decorator that returns paginated data with correct limit/offset validation and HTTP responses.
- process_params: parses query parameters from bottle request
Provides functions that consistently format date/time and timestamp data for use in APIs.
Implements an opinionated wrapper for MongoDB databases and collections
that works with the [rest][#rest] module and supports query param filtering
(including text search) and pagination of backend collections.
## release
[](https://pypi.python.org/pypi/simpl)
## builds
| Branch | Status |
| ------------- | ------------- |
| [master](https://github.com/rackerlabs/simpl/tree/master) | [](https://travis-ci.org/rackerlabs/simpl) |