Skip to main content

simpl is a collection of useful, common python libraries, primarily for building web services and APIs

Project description

# simpl [![Build Status](https://travis-ci.org/checkmate/simpl.svg?branch=master)](https://travis-ci.org/checkmate/simpl) [![Coverage Status](https://coveralls.io/repos/checkmate/simpl/badge.svg?branch=master)](https://coveralls.io/r/checkmate/simpl?branch=master)

Common Python libraries for:

  • [Configuration](#config)

  • [Logging](#logging)

  • [Secrets](#secrets)

  • [Python Utilites](#python)

  • [WSGI Middleware](#middleware)

  • [REST API Tooling](#rest)

  • [Date/Time (chronos)](#chronos)

  • [MongoDB Backend Wrapper](#mongo)

## <a name=”config”></a>Config

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

## <a name=”logging”></a>Logging (simpl.log)

Encapsulates logging boilerplate code to initialize logging using the [config](#config) module.

## <a name=”secrets”></a>Sensitive Value Helpers

Helpers for managing sensitive values.

## <a name=”python”></a>Python Utilities

Code we wished was built in to python (or was simpler to use): - dictionary and list merging - dictionary get/set/in by path

## <a name=”middleware”></a>WSGI middleware

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.

## <a name=”rest”></a>REST API Tooling

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

## <a name=”chronos”></a>Date/Time Utilites

Provides functions that consistently format date/time and timestamp data for use in APIs.

## <a name=”mongo”></a>MongoDB Backend Wrapper

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 [![latest](https://img.shields.io/pypi/v/simpl.svg)](https://pypi-hypernode.com/pypi/simpl)

## builds

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simpl-0.7.1.tar.gz (333.5 kB view details)

Uploaded Source

Built Distribution

simpl-0.7.1-py2.py3-none-any.whl (60.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file simpl-0.7.1.tar.gz.

File metadata

  • Download URL: simpl-0.7.1.tar.gz
  • Upload date:
  • Size: 333.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for simpl-0.7.1.tar.gz
Algorithm Hash digest
SHA256 409cb72614ab9be5394a45085ad2d48f728eefd33489b644703c500546b8892b
MD5 372c91b3bdd11a74394247482c34fd1b
BLAKE2b-256 3a2367f8bda944841002550e81694f74426463f5f32ebb6552dd8548d0fae358

See more details on using hashes here.

File details

Details for the file simpl-0.7.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for simpl-0.7.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a6d444cadc8422f965052b800eff950c4b0ff3e8f6e5dc97cbd51c8b860f587e
MD5 aafca45e84968a89259c6a821fb739c3
BLAKE2b-256 e779de33646c0c02634ac088eed126c9a95d05ba99369e13db7fd60d9ef6cb14

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page