Mixed methods.
Project description
mixed-methods
Mixed methods.
Installing
Python 3.8 or above is required.
pip
Installing the library with pip
is quite simple:
$ pip install mixed-methods
Alternatively, the library can be installed from source:
$ git clone https://github.com/nekitdev/mixed-methods.git
$ cd mixed-methods
$ python -m pip install .
poetry
You can add mixed-methods
as a dependency with the following command:
$ poetry add mixed-methods
Or by directly specifying it in the configuration like so:
[tool.poetry.dependencies]
mixed-methods = "^1.1.1"
Alternatively, you can add it directly from the source:
[tool.poetry.dependencies.mixed-methods]
git = "https://github.com/nekitdev/mixed-methods.git"
Examples
# main.py
from mixed_methods import mixed_method
class Type:
@classmethod
def type_method(cls) -> int:
return 13
def instance_method(self) -> int:
return 42
method = mixed_method(type_method, instance_method)
>>> from main import Type
>>> Type.method()
13
>>> instance = Type()
>>> instance.method()
42
Documentation
You can find the documentation here.
Support
If you need support with the library, you can send an email or refer to the official Discord server.
Changelog
You can find the changelog here.
Security Policy
You can find the Security Policy of mixed-methods
here.
Contributing
If you are interested in contributing to mixed-methods
, make sure to take a look at the
Contributing Guide, as well as the Code of Conduct.
License
mixed-methods
is licensed under the MIT License terms. See License for details.
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
Built Distribution
File details
Details for the file mixed_methods-1.1.1.tar.gz
.
File metadata
- Download URL: mixed_methods-1.1.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.0 CPython/3.10.12 Linux/6.2.0-1019-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cbd33e1af250d2496c7d3829b55be005ddb000b6980d0c15c599a5abe12125e |
|
MD5 | 62ba5a2cfa0a2dabe3b7fbaca8cdc7c7 |
|
BLAKE2b-256 | 0ddaa75790089190201643882df475640b4f1c17d366b08875a7fd2b550b7035 |
File details
Details for the file mixed_methods-1.1.1-py3-none-any.whl
.
File metadata
- Download URL: mixed_methods-1.1.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.0 CPython/3.10.12 Linux/6.2.0-1019-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0332754ab4fb89812bb1f421b9bc3641e260618c4ae4f085b41cf262563f83b |
|
MD5 | 7bad01132b3d9a6e94b9229307238700 |
|
BLAKE2b-256 | 47d9d3d617f179e1ccb6bdc373a0cd5c9c5e03feaa9afdef3a05e7c62d108c01 |