Skip to main content

Local locations

Project description

Local locations for Python

It's mi vida loca.

Loca is a highly opinionated redesign of appdirs. It relies on pathlib, dataclasses and @property to replace most of the parameters in the original library to create a more intuitive API.

Usage

from loca import Loca

loca = Loca()
assert loca == loca.user.data == loca.data.user
assert loca.state() == loca.user.state()
assert loca.config == loca.user.config
assert loca.cache() == loca.cache.user()

shared = loca.shared
assert shared == loca.shared.data == loca.data.shared
foobar_shared_config = shared.config() / 'foobar'

Contributing

Patches must pass the checks run by tox and should be sent to ~cnx/misc@lists.sr.ht using git send-email, with the following configurations:

git config sendemail.to '~cnx/misc@lists.sr.ht'
git config format.subjectPrefix 'PATCH python-loca'

Copying

LGPLv3

Loca is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

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

loca-2.0.1.tar.gz (8.1 kB view hashes)

Uploaded source

Built Distribution

loca-2.0.1-py3-none-any.whl (10.5 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page