Skip to main content

Cross-platfom provisioning of home directory storage

Project description

pypaxtor: Package Storage provisioning

Simple module that provides a path to a storage location under the user home directory in a cross-platform manner.

Under MacOS this will be in ~/Library/Application Support; under Windows it will be in $HOME/AppData/Local; and under Linux it will be in ~/.local/share.

Packages using this module supply a package name when requesting a storage location. A directory with that name is created under the directory named PyPaxtor in the os-appropriate location.

Usage:

>>> import pypaxtor
>>> savedir = pypaxtor.get_storage_location('my_package')
>>> savedir  # if on Mac as user `rlyacht`
PosixPath('/Users/rlyacht/Library/Application Support/pypaxtor/my_package')
>>> with open(savedir / 'SaveFile.txt') as savefile:
...     # do stuff

If the above code is executed on a linux system, the saved file will be located at /home/rlyacht/.local/share/pypaxtor/my_package/SaveFile.txt.

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

pypaxtor-0.1.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

pypaxtor-0.1.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file pypaxtor-0.1.0.tar.gz.

File metadata

  • Download URL: pypaxtor-0.1.0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5

File hashes

Hashes for pypaxtor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1f10df8dfe2d6062378d851438b5b9c5a9d2784f651de0f9e56f5fcfbb2c2f43
MD5 766e7ebde3ae8628f4ce70c5a7a58825
BLAKE2b-256 4b7aec56d4efed81d3dc2480902a91cd3782e2dbe74a65e08057dfd63b219c0e

See more details on using hashes here.

File details

Details for the file pypaxtor-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pypaxtor-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5

File hashes

Hashes for pypaxtor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b8dc1e952ac47ae504352641a1271a4d02f3819d226084c22817264cfb617418
MD5 3e4bc714948ade09b29cd4d9decf002c
BLAKE2b-256 9df11e3d93b28770f846e4f89607416d4a4f0e156da5dadd5085baafe5ec6acc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page