Find a file
2023-12-26 03:12:40 +01:00
.github/workflows Change runs-on for github action 2023-12-26 03:12:40 +01:00
appdata Fix config path for MacOS 2023-12-24 18:49:30 +01:00
docs Add code blocks 2021-12-19 16:20:51 +03:00
tests fixes typos 2022-12-23 12:29:20 +03:00
.gitignore Hotfix 2021-12-19 17:05:27 +03:00
CONTRIBUTING.md Add CONTRIBUTING.md 2020-04-15 02:02:05 +03:00
LICENSE.md Add LICENSE.md 2020-04-15 02:02:11 +03:00
pytest.ini Add fixes and tests 2021-12-19 17:59:39 +03:00
README.md Fix config path for MacOS 2023-12-24 18:49:30 +01:00
requirements.txt Hotfix 2021-12-19 17:05:27 +03:00
setup.py Fix config path for MacOS 2023-12-24 18:49:30 +01:00

appdata | Application Data Management

Coverage Status PyPI release Build status Documentation

Maintainability made-with-python License Downloads

Linux Windows macOS

Installation

pip install appdata

Documentation

The detailed documentation you can find on appdata.readthedocs.io.

Usage

To manage paths of application data folder there is AppDataPaths class:

from appdata import AppDataPaths

app_paths = AppDataPaths('myapp')  # Name is optional. By default CWD folder name is used.

To create the application folder tree:

app_paths.setup()

There are few paths specified to manage your application data folder:

print(app_paths.name)  # myapp
print(app_paths.app_data_path)  # (for Linux and MacOS) /home/<user>/.myapp
print(app_paths.logs_path)  # (for Linux and MacOS) /home/<user>/.myapp/logs
print(app_paths.config_path)  # (for Linux and MacOS) /home/<user>/.myapp/default.ini
print(app_paths.log_file_path)  # (for Linux and MacOS) /home/<user>/.myapp/logs/myapp.log

Every path could be customized. See options here.

Contributing

See CONTRIBUTING.md

License

MIT