Skip to main content

Mixed methods.

Project description

mixed-methods

License Version Downloads Discord

Documentation Check Test Coverage

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

mixed_methods-1.1.1.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

mixed_methods-1.1.1-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

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