# `solus`
[![License][License Badge]][License]
[![Version][Version Badge]][Package]
[![Downloads][Downloads Badge]][Package]
[![Discord][Discord Badge]][Discord]
[![Documentation][Documentation Badge]][Documentation]
[![Check][Check Badge]][Actions]
[![Test][Test Badge]][Actions]
[![Coverage][Coverage Badge]][Coverage]
> *Singleton types.*
## Installing
**Python 3.8 or above is required.**
### pip
Installing the library with `pip` is quite simple:
```console
$ pip install solus
```
Alternatively, the library can be installed from source:
```console
$ git clone https://github.com/nekitdev/solus.git
$ cd solus
$ python -m pip install .
```
### poetry
You can add `solus` as a dependency with the following command:
```console
$ poetry add solus
```
Or by directly specifying it in the configuration like so:
```toml
[tool.poetry.dependencies]
solus = "^1.2.2"
```
Alternatively, you can add it directly from the source:
```toml
[tool.poetry.dependencies.solus]
git = "https://github.com/nekitdev/solus.git"
```
## Examples
### Default
[`Singleton`][solus.core.Singleton] type is used to create *thread-safe* singletons.
```python
from solus import Singleton
class Null(Singleton):
...
```
Somewhere else in the code:
```python
null = Null() # instantiate
```
### Unsafe
[`UnsafeSingleton`][solus.core.UnsafeSingleton] type is used to create *thread-unsafe* singletons.
```python
from solus import UnsafeSingleton
class Null(UnsafeSingleton):
...
null = Null() # instantiate right away
```
### Warning
!!! warning
It is highly recommended to instantiate unsafe singleton types right after their creation!
## Documentation
You can find the documentation [here][Documentation].
## Support
If you need support with the library, you can send an [email][Email]
or refer to the official [Discord server][Discord].
## Changelog
You can find the changelog [here][Changelog].
## Security Policy
You can find the Security Policy of `solus` [here][Security].
## Contributing
If you are interested in contributing to `solus`, make sure to take a look at the
[Contributing Guide][Contributing Guide], as well as the [Code of Conduct][Code of Conduct].
## License
`solus` is licensed under the MIT License terms. See [License][License] for details.
[Email]: mailto:support@nekit.dev
[Discord]: https://nekit.dev/chat
[Actions]: https://github.com/nekitdev/solus/actions
[Changelog]: https://github.com/nekitdev/solus/blob/main/CHANGELOG.md
[Code of Conduct]: https://github.com/nekitdev/solus/blob/main/CODE_OF_CONDUCT.md
[Contributing Guide]: https://github.com/nekitdev/solus/blob/main/CONTRIBUTING.md
[Security]: https://github.com/nekitdev/solus/blob/main/SECURITY.md
[License]: https://github.com/nekitdev/solus/blob/main/LICENSE
[Package]: https://pypi.org/project/solus
[Coverage]: https://codecov.io/gh/nekitdev/solus
[Documentation]: https://nekitdev.github.io/solus
[Discord Badge]: https://img.shields.io/discord/728012506899021874
[License Badge]: https://img.shields.io/pypi/l/solus
[Version Badge]: https://img.shields.io/pypi/v/solus
[Downloads Badge]: https://img.shields.io/pypi/dm/solus
[Documentation Badge]: https://github.com/nekitdev/solus/workflows/docs/badge.svg
[Check Badge]: https://github.com/nekitdev/solus/workflows/check/badge.svg
[Test Badge]: https://github.com/nekitdev/solus/workflows/test/badge.svg
[Coverage Badge]: https://codecov.io/gh/nekitdev/solus/branch/main/graph/badge.svg
[solus.core.Singleton]: https://nekitdev.github.io/solus/reference#solus.Singleton
[solus.core.UnsafeSingleton]: https://nekitdev.github.io/solus/reference#solus.UnsafeSingleton
Raw data
{
"_id": null,
"home_page": "https://github.com/nekitdev/solus",
"name": "solus",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "python,singleton",
"author": "nekitdev",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/1b/39/30f3e81fa40f51ccf55a187928e8783e4860f9002d4e48abcfcccabe9d10/solus-1.2.2.tar.gz",
"platform": null,
"description": "# `solus`\n\n[![License][License Badge]][License]\n[![Version][Version Badge]][Package]\n[![Downloads][Downloads Badge]][Package]\n[![Discord][Discord Badge]][Discord]\n\n[![Documentation][Documentation Badge]][Documentation]\n[![Check][Check Badge]][Actions]\n[![Test][Test Badge]][Actions]\n[![Coverage][Coverage Badge]][Coverage]\n\n> *Singleton types.*\n\n## Installing\n\n**Python 3.8 or above is required.**\n\n### pip\n\nInstalling the library with `pip` is quite simple:\n\n```console\n$ pip install solus\n```\n\nAlternatively, the library can be installed from source:\n\n```console\n$ git clone https://github.com/nekitdev/solus.git\n$ cd solus\n$ python -m pip install .\n```\n\n### poetry\n\nYou can add `solus` as a dependency with the following command:\n\n```console\n$ poetry add solus\n```\n\nOr by directly specifying it in the configuration like so:\n\n```toml\n[tool.poetry.dependencies]\nsolus = \"^1.2.2\"\n```\n\nAlternatively, you can add it directly from the source:\n\n```toml\n[tool.poetry.dependencies.solus]\ngit = \"https://github.com/nekitdev/solus.git\"\n```\n\n## Examples\n\n### Default\n\n[`Singleton`][solus.core.Singleton] type is used to create *thread-safe* singletons.\n\n```python\nfrom solus import Singleton\n\n\nclass Null(Singleton):\n ...\n```\n\nSomewhere else in the code:\n\n```python\nnull = Null() # instantiate\n```\n\n### Unsafe\n\n[`UnsafeSingleton`][solus.core.UnsafeSingleton] type is used to create *thread-unsafe* singletons.\n\n```python\nfrom solus import UnsafeSingleton\n\n\nclass Null(UnsafeSingleton):\n ...\n\n\nnull = Null() # instantiate right away\n```\n\n### Warning\n\n!!! warning\n\n It is highly recommended to instantiate unsafe singleton types right after their creation!\n\n## Documentation\n\nYou can find the documentation [here][Documentation].\n\n## Support\n\nIf you need support with the library, you can send an [email][Email]\nor refer to the official [Discord server][Discord].\n\n## Changelog\n\nYou can find the changelog [here][Changelog].\n\n## Security Policy\n\nYou can find the Security Policy of `solus` [here][Security].\n\n## Contributing\n\nIf you are interested in contributing to `solus`, make sure to take a look at the\n[Contributing Guide][Contributing Guide], as well as the [Code of Conduct][Code of Conduct].\n\n## License\n\n`solus` is licensed under the MIT License terms. See [License][License] for details.\n\n[Email]: mailto:support@nekit.dev\n\n[Discord]: https://nekit.dev/chat\n\n[Actions]: https://github.com/nekitdev/solus/actions\n\n[Changelog]: https://github.com/nekitdev/solus/blob/main/CHANGELOG.md\n[Code of Conduct]: https://github.com/nekitdev/solus/blob/main/CODE_OF_CONDUCT.md\n[Contributing Guide]: https://github.com/nekitdev/solus/blob/main/CONTRIBUTING.md\n[Security]: https://github.com/nekitdev/solus/blob/main/SECURITY.md\n\n[License]: https://github.com/nekitdev/solus/blob/main/LICENSE\n\n[Package]: https://pypi.org/project/solus\n[Coverage]: https://codecov.io/gh/nekitdev/solus\n[Documentation]: https://nekitdev.github.io/solus\n\n[Discord Badge]: https://img.shields.io/discord/728012506899021874\n[License Badge]: https://img.shields.io/pypi/l/solus\n[Version Badge]: https://img.shields.io/pypi/v/solus\n[Downloads Badge]: https://img.shields.io/pypi/dm/solus\n\n[Documentation Badge]: https://github.com/nekitdev/solus/workflows/docs/badge.svg\n[Check Badge]: https://github.com/nekitdev/solus/workflows/check/badge.svg\n[Test Badge]: https://github.com/nekitdev/solus/workflows/test/badge.svg\n[Coverage Badge]: https://codecov.io/gh/nekitdev/solus/branch/main/graph/badge.svg\n\n[solus.core.Singleton]: https://nekitdev.github.io/solus/reference#solus.Singleton\n[solus.core.UnsafeSingleton]: https://nekitdev.github.io/solus/reference#solus.UnsafeSingleton\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Singleton types.",
"version": "1.2.2",
"project_urls": {
"Chat": "https://nekit.dev/chat",
"Documentation": "https://nekitdev.github.io/solus",
"Funding": "https://nekit.dev/funding",
"Homepage": "https://github.com/nekitdev/solus",
"Issues": "https://github.com/nekitdev/solus/issues",
"Repository": "https://github.com/nekitdev/solus"
},
"split_keywords": [
"python",
"singleton"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "bf14e63493752b7e408f775e10cea9551a61190aaa99b63483b57dc769af9602",
"md5": "d468f4401b5a9f83bf520d89438c41da",
"sha256": "2587bcc74cd872a21532cf5cdc9617796473626c3fd7033fcbb09e0f1bf528bc"
},
"downloads": -1,
"filename": "solus-1.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d468f4401b5a9f83bf520d89438c41da",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 4322,
"upload_time": "2024-02-26T12:20:17",
"upload_time_iso_8601": "2024-02-26T12:20:17.604830Z",
"url": "https://files.pythonhosted.org/packages/bf/14/e63493752b7e408f775e10cea9551a61190aaa99b63483b57dc769af9602/solus-1.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1b3930f3e81fa40f51ccf55a187928e8783e4860f9002d4e48abcfcccabe9d10",
"md5": "f1f7573af40670d37bbbbc79e80fe519",
"sha256": "4bf499b0ea8fd9aca23d27d559008dfee1c75b9336f5a9c7143069c3f5282444"
},
"downloads": -1,
"filename": "solus-1.2.2.tar.gz",
"has_sig": false,
"md5_digest": "f1f7573af40670d37bbbbc79e80fe519",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 4078,
"upload_time": "2024-02-26T12:20:19",
"upload_time_iso_8601": "2024-02-26T12:20:19.321741Z",
"url": "https://files.pythonhosted.org/packages/1b/39/30f3e81fa40f51ccf55a187928e8783e4860f9002d4e48abcfcccabe9d10/solus-1.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-26 12:20:19",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nekitdev",
"github_project": "solus",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "solus"
}