Coder Social home page Coder Social logo

vbe0201 / better-contextvars Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 28 KB

contextvars is a great module. Let's make it compatible to Python 3.5+.

Home Page: https://www.python.org/dev/peps/pep-0567

License: MIT License

Python 100.00%
python3 contextvars python-utility tools utility

better-contextvars's Introduction

~~ Better Contextvars ~~

image

image

image

image

image

image

image

About this project

This project implements a backport of the PEP 567 contextvars module from Python 3.7 for Python 3.5+. It is a full implementation of the original contextvars module with the same features.

Installation

Installation is very easy. Either install it from PyPI or directly from GitHub:

$ pip3 install -U better-contextvars
$ pip3 install -U git+https://github.com/itsVale/better-contextvars#egg=better-contextvars

$ git clone https://github.com/itsVale/better-contextvars
$ python3 setup.py install

Documentation

As stated above, this is an exact representation of the original contextvars module. Because of that, it is totally fine to use the official documentation for contextvars.

PEP 567 provides a comprehensive overview of the API.

Usage

You use it the same way as the original module.

import better_contextvars as contextvars

var = contextvars.ContextVar('test')
...

For more usage examples, have a look at tests.

Contributing

If you decide to contribute, please always lint your code. The preferred linter is pylama.

better-contextvars's People

Contributors

vbe0201 avatar

Stargazers

 avatar

Watchers

 avatar

better-contextvars's Issues

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.