Skip to main content

solus

License Version Downloads Discord

Documentation Check Test Coverage

Singleton types.

Installing

Python 3.8 or above is required.

pip

Installing the library with pip is quite simple:

$ pip install solus

Alternatively, the library can be installed from source:

$ 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:

$ poetry add solus

Or by directly specifying it in the configuration like so:

[tool.poetry.dependencies]
solus = "^1.2.2"

Alternatively, you can add it directly from the source:

[tool.poetry.dependencies.solus]
git = "https://github.com/nekitdev/solus.git"

Examples

Default

Singleton type is used to create thread-safe singletons.

from solus import Singleton


class Null(Singleton):
    ...

Somewhere else in the code:

null = Null()  # instantiate

Unsafe

UnsafeSingleton type is used to create thread-unsafe singletons.

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.

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 solus here.

Contributing

If you are interested in contributing to solus, make sure to take a look at the Contributing Guide, as well as the Code of Conduct.

License

solus is licensed under the MIT License terms. See License for details.

Metadata

Release files for solus 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for solus 1.2.2
File Size Uploaded
solus-1.2.2.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for solus 1.2.2
File Interpreter ABI Platform
solus-1.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 8.4 kB

Release files / solus-1.2.2.tar.gz

Download URL solus-1.2.2.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4bf499b0ea8fd9aca23d27d559008dfee1c75b9336f5a9c7143069c3f5282444
BLAKE2b-256 checksum
How to use checksums
1b3930f3e81fa40f51ccf55a187928e8783e4860f9002d4e48abcfcccabe9d10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.0 CPython/3.10.12 Linux/6.2.0-1019-azure

Release files / solus-1.2.2-py3-none-any.whl

Download URL solus-1.2.2-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2587bcc74cd872a21532cf5cdc9617796473626c3fd7033fcbb09e0f1bf528bc
BLAKE2b-256 checksum
How to use checksums
bf14e63493752b7e408f775e10cea9551a61190aaa99b63483b57dc769af9602
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.0 CPython/3.10.12 Linux/6.2.0-1019-azure

Release history Release notifications | RSS feed

This release

1.2.2 This release

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page