Name | generic JSON |
Version |
1.1.5
JSON |
| download |
home_page | None |
Summary | Generic programming library for Python |
upload_time | 2025-07-11 19:54:46 |
maintainer | Arjan Molenaar |
docs_url | https://pythonhosted.org/generic/ |
author | Andrey Popp |
requires_python | >=3.8 |
license | None |
keywords |
generic
multi dispatch
dispatch
event
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Generic programming library for Python
[](https://github.com/gaphor/generic/actions)
[](https://codeclimate.com/github/gaphor/generic/maintainability)
[](https://codeclimate.com/github/gaphor/generic/test_coverage)
[](https://generic.readthedocs.io/en/latest/?badge=latest)
[](https://app.element.io/#/room/#gaphor_Lobby:gitter.im)
[](https://securityscorecards.dev/viewer/?platform=github.com&org=gaphor&repo=generic)
Generic is a library for [Generic programming](https://en.wikipedia.org/wiki/Generic_programming), also known as [Multiple dispatch](https://en.wikipedia.org/wiki/Multiple_dispatch).
The Generic library supports:
* multi-dispatch: like `functools.singledispatch`, but for more than one parameter
* multi-methods: multi-dispatch, but for methods
* event dispatching: based on a hierarchical event structure (event objects)
You can read
[documentation](http://generic.readthedocs.org/en/latest/index.html) hosted at
excellent readthedocs.org project. Development takes place on
[github](http://github.com/gaphor/generic).
# Changes
## 1.1.4
- Dependency updates
## 1.1.3
- Dependency updates
## 1.1.2
- Replace print statements with logging
- Enable trusted publisher for PyPI
- Create Security Policy
- Update LICENSE to BSD 3-Clause
- Add support for Python 3.12
- Simplify build: drop tox
- Update documentation theme to Furo
- Switch linting to ruff
## 1.1.1
- Add support for Python 3.11
- Move mypy configuration to pyproject.toml
- Enable automatic release of new versions with CI
## 1.1.0
- Rename `master` branch to `main`
- `generic.event.Manager` executes all handlers and throws an `ExceptionGroup` in case of errors
## 1.0.1
- Add Support for Python 3.10, Drop Support for Python 3.7
- Enable Pre-commit Hooks for isort, toml, yaml, pyupgrade, docformatter, and flake8
- Migrate to GitHub Actions
## 1.0.0
- Updated documentation on [Readthedocs](https://generic.readthedocs.io)
- Fix `multimethod.otherwise` clause
## 1.0.0b1
- Ported the code to Python 3.7, Python 2 is no longer supported
- Multimethods now have their own module
- The interface now mimics `functools.singledispatch`:
- the `when` method has been renamed to `register`
- overriding of methods is no longer possible
## 0.3.1
- Minor fixes in distribution.
## 0.3
- Event management with event inheritance support.
## 0.2
- Methods with multidispatch by object type and positional arguments.
- Override multifunctions with ``override`` method.
## 0.1
- Registry with simple and type axes.
- Functions with multidispatch by positional arguments.
Raw data
{
"_id": null,
"home_page": null,
"name": "generic",
"maintainer": "Arjan Molenaar",
"docs_url": "https://pythonhosted.org/generic/",
"requires_python": ">=3.8",
"maintainer_email": "gaphor@gmail.com",
"keywords": "generic, multi dispatch, dispatch, event",
"author": "Andrey Popp",
"author_email": "8mayday@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/8b/1c/0df504f8b28f29be98c19762b02978fce8baee596f73f20a0530540401b2/generic-1.1.5.tar.gz",
"platform": null,
"description": "# Generic programming library for Python\n\n[](https://github.com/gaphor/generic/actions)\n[](https://codeclimate.com/github/gaphor/generic/maintainability)\n[](https://codeclimate.com/github/gaphor/generic/test_coverage)\n[](https://generic.readthedocs.io/en/latest/?badge=latest)\n[](https://app.element.io/#/room/#gaphor_Lobby:gitter.im)\n[](https://securityscorecards.dev/viewer/?platform=github.com&org=gaphor&repo=generic)\n\nGeneric is a library for [Generic programming](https://en.wikipedia.org/wiki/Generic_programming), also known as [Multiple dispatch](https://en.wikipedia.org/wiki/Multiple_dispatch).\n\nThe Generic library supports:\n\n* multi-dispatch: like `functools.singledispatch`, but for more than one parameter\n* multi-methods: multi-dispatch, but for methods\n* event dispatching: based on a hierarchical event structure (event objects)\n\nYou can read\n[documentation](http://generic.readthedocs.org/en/latest/index.html) hosted at\nexcellent readthedocs.org project. Development takes place on\n[github](http://github.com/gaphor/generic).\n\n\n# Changes\n\n## 1.1.4\n\n- Dependency updates\n\n## 1.1.3\n\n- Dependency updates\n\n## 1.1.2\n\n- Replace print statements with logging\n- Enable trusted publisher for PyPI\n- Create Security Policy\n- Update LICENSE to BSD 3-Clause\n- Add support for Python 3.12\n- Simplify build: drop tox\n- Update documentation theme to Furo\n- Switch linting to ruff\n\n## 1.1.1\n\n- Add support for Python 3.11\n- Move mypy configuration to pyproject.toml\n- Enable automatic release of new versions with CI\n\n## 1.1.0\n\n- Rename `master` branch to `main`\n- `generic.event.Manager` executes all handlers and throws an `ExceptionGroup` in case of errors\n\n## 1.0.1\n\n- Add Support for Python 3.10, Drop Support for Python 3.7\n- Enable Pre-commit Hooks for isort, toml, yaml, pyupgrade, docformatter, and flake8\n- Migrate to GitHub Actions\n\n## 1.0.0\n\n- Updated documentation on [Readthedocs](https://generic.readthedocs.io)\n- Fix `multimethod.otherwise` clause\n\n## 1.0.0b1\n\n- Ported the code to Python 3.7, Python 2 is no longer supported\n- Multimethods now have their own module\n- The interface now mimics `functools.singledispatch`:\n - the `when` method has been renamed to `register`\n - overriding of methods is no longer possible\n\n## 0.3.1\n\n- Minor fixes in distribution.\n\n## 0.3\n\n- Event management with event inheritance support.\n\n## 0.2\n\n- Methods with multidispatch by object type and positional arguments.\n- Override multifunctions with ``override`` method.\n\n## 0.1\n\n- Registry with simple and type axes.\n- Functions with multidispatch by positional arguments.\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Generic programming library for Python",
"version": "1.1.5",
"project_urls": {
"Documentation": "https://generic.readthedocs.io/",
"Homepage": "https://generic.readthedocs.io/",
"Repository": "https://github.com/gaphor/generic"
},
"split_keywords": [
"generic",
" multi dispatch",
" dispatch",
" event"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "4cc9729ceabda36c103e00b26e32ae0ad1ec22a8f679f989957fbc01cefc05fe",
"md5": "d9e298972957b094f4bd45bb40afd22b",
"sha256": "d7b2cafd07542d2ead79d7e878d68bdbcb3c03cbbf359d5b902e9ff69164ccba"
},
"downloads": -1,
"filename": "generic-1.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d9e298972957b094f4bd45bb40afd22b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 9891,
"upload_time": "2025-07-11T19:54:44",
"upload_time_iso_8601": "2025-07-11T19:54:44.715556Z",
"url": "https://files.pythonhosted.org/packages/4c/c9/729ceabda36c103e00b26e32ae0ad1ec22a8f679f989957fbc01cefc05fe/generic-1.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "8b1c0df504f8b28f29be98c19762b02978fce8baee596f73f20a0530540401b2",
"md5": "a81909024041c90c95f27bc1570f3623",
"sha256": "0efa62c3a0d141ccd3e53723f35208d5c7590083db7164c810d2cffd0429ae92"
},
"downloads": -1,
"filename": "generic-1.1.5.tar.gz",
"has_sig": false,
"md5_digest": "a81909024041c90c95f27bc1570f3623",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 8259,
"upload_time": "2025-07-11T19:54:46",
"upload_time_iso_8601": "2025-07-11T19:54:46.034403Z",
"url": "https://files.pythonhosted.org/packages/8b/1c/0df504f8b28f29be98c19762b02978fce8baee596f73f20a0530540401b2/generic-1.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-11 19:54:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "gaphor",
"github_project": "generic",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "generic"
}