Metadata-Version: 2.1
Name: typing-compat
Version: 0.1.0
Summary: Python typing compatibility library
Home-page: https://github.com/rossmacarthur/typing-compat
Author: Ross MacArthur
Author-email: ross@macarthur.io
License: UNKNOWN
Download-URL: https://github.com/rossmacarthur/typing-compat/archive/0.1.0.tar.gz
Project-URL: Issue Tracker, https://github.com/rossmacarthur/typing-compat/issues
Description: <h1 align="center">typing-compat</h1>
        <div align="center">
          <strong>Python typing compatibility library</a></strong>
        </div>
        <br />
        <div align="center">
          <a href="https://github.com/rossmacarthur/typing-compat/actions?query=workflow%3Abuild">
            <img src="https://github.com/rossmacarthur/typing-compat/workflows/build/badge.svg?branch=master" alt="Build status" />
          </a>
          <a href="https://github.com/psf/black">
            <img src="https://img.shields.io/badge/code%20style-black-101010.svg" alt="Code style: black" />
          </a>
        </div>
        <br />
        
        In Python >=3.8 the `typing.get_origin` and `typing.get_args` functions are
        provided. This library aims to bring the identical behaviour of these functions
        to other versions of Python.
        
        ## Getting started
        
        ```bash
        pip install typing-compat
        ```
        
        ## Usage
        
        ```python
        >>> from typing import List, Tuple, TypeVar
        >>> from typing_compat import get_args, get_origin
        >>> T = TypeVar('T')
        
        >>> tp = List[Tuple[T, T]][int]
        
        >>> get_args(tp)
        (typing.Tuple[int, int],)
        
        >>> get_origin(tp)
        <class 'list'>
        
        ```
        
        ## License
        
        This library is licensed under either of
        
        - Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or
          https://www.apache.org/licenses/LICENSE-2.0)
        - MIT License ([LICENSE-MIT](LICENSE-MIT) or
          https://opensource.org/licenses/MIT)
        
        at your option.
        
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: Apache Software License
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
Description-Content-Type: text/markdown
