Bringing interfaces to Python.
Project description
python-interfaces
Installation
pip install python-interfaces
Usage
from interface import interface
class Iterable:
def be_iterable(self):
pass
@interface(Iterable)
class Foo:
def __init__(self):
pass
# raises InterfaceException
Local Development
git clone https://github.com/tyleragreen/python-interfaces.git && cd python-interfaces
virtualenv ~/.env/interface
source ~/.env/interface/bin/activate
pip install -r requirements_dev.txt
# Since the tests live outside the package, we install the package in editable mode
pip install -e .
py.test
Other Ideas
- Support dunder methods
- Enforce method signatures
- Require interface methods to be empty/abstract/
pass-only
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python-interfaces-0.1.2.tar.gz.
File metadata
- Download URL: python-interfaces-0.1.2.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b809d02d9b9ee635cd1f7088a41184aac0b4ffd8c63424da39c937122972b26
|
|
| MD5 |
5d2f2d1c23d3543dbcb19a5c81e558e0
|
|
| BLAKE2b-256 |
a864bd3ba8648283efa8b403716f82e0275f5315fd69e65f94e631e6f56dca04
|
File details
Details for the file python_interfaces-0.1.2-py3-none-any.whl.
File metadata
- Download URL: python_interfaces-0.1.2-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61d2ffdecaff2ffd7166b654bb6ee667823fe4008dee6d23a19d4d5a51242e2e
|
|
| MD5 |
0eac8afd8d13f89c4d0b0fc27dced186
|
|
| BLAKE2b-256 |
671462c06ba8b8c33e23f361ff28cbe95bf1ea960f8c69fa4edf643c74947bb8
|