{"id":22372514,"url":"https://github.com/leenr/tls-property","last_synced_at":"2025-07-30T21:32:17.308Z","repository":{"id":57475926,"uuid":"169225206","full_name":"leenr/tls-property","owner":"leenr","description":"Thread-local storage property","archived":false,"fork":false,"pushed_at":"2019-08-05T13:18:50.000Z","size":20,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-30T22:46:27.310Z","etag":null,"topics":["python","python-libary","thread-local-storage"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leenr.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-05T10:45:28.000Z","updated_at":"2024-03-21T07:38:44.000Z","dependencies_parsed_at":"2022-09-07T13:51:47.094Z","dependency_job_id":null,"html_url":"https://github.com/leenr/tls-property","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leenr%2Ftls-property","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leenr%2Ftls-property/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leenr%2Ftls-property/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leenr%2Ftls-property/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leenr","download_url":"https://codeload.github.com/leenr/tls-property/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228189784,"owners_count":17882692,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","python-libary","thread-local-storage"],"created_at":"2024-12-04T20:43:14.034Z","updated_at":"2024-12-04T20:43:14.782Z","avatar_url":"https://github.com/leenr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"=============\n@tls_property\n=============\n\n`@tls_property` is a super-tiny library that will help you write\nthread-safe classes.\n\nIt's acting like a `@cached_property \u003chttps://pypi.org/project/cached-property/\u003e`_,\nbut value will be cached only for current thread.\n\nGarbage collecting is respected, `@tls_property` won't mess up with it.\n\n.. code-block:: python\n\n    from some_library import NonThreadsafeSuperClient\n    from tls_property import tls_property\n\n    class SuperClientWrapper:\n        @tls_property\n        def nonthreadsafe_client(self) -\u003e NonThreadsafeSuperClient:\n            return NonThreadsafeSuperClient()\n\nAlso, value reset supported via @tls_property :code:`del` ete:\n\n.. code-block:: python\n\n    client = SuperClientWrapper()\n    client.something()\n    del client.nonthreadsafe_client\n    client.something()\n..\n\nModule works on Python == 2.7 and Python ~= 3.4.\n\nInstallation\n------------\n.. code-block:: bash\n\n    pip install tls-property\n..\n\nLicense\n-------\nPublic Domain: `CC0 1.0 Universal \u003chttps://creativecommons.org/publicdomain/zero/1.0/\u003e`_.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleenr%2Ftls-property","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleenr%2Ftls-property","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleenr%2Ftls-property/lists"}