Skip to main content

Small utilities for Redis

Project description

aia_utilities

Utilities that are shared between Aia microservices.

Building and publishing to PyPI

  1. Build distributions:
python -m pip install --upgrade build twine
python -m build
  1. (Optional) Test upload to Test PyPI:
python -m twine upload --repository testpypi dist/*
  1. Upload to production PyPI:
python -m twine upload dist/*
  1. Install and verify:
pip install aia-utilities
python -c "from aia_utilities import Redis_Utilities; print(Redis_Utilities)"

Troubleshooting Test PyPI 403 Forbidden errors

If twine upload to Test PyPI returns a 403 Forbidden with "Invalid or non-existent authentication information", follow these steps:

  1. Ensure you created an API token on Test PyPI: https://test.pypi.org/manage/account/#api-tokens

    • When creating a token, copy it immediately. You cannot view it again.
  2. Use the token as your password and __token__ as username.

Recommended (temporary) environment variables:

export TWINE_USERNAME='__token__'
export TWINE_PASSWORD='pypi-AgENd...your-token-here'
python -m twine upload --repository testpypi dist/*

Or store credentials in ~/.pypirc:

[distutils]
index-servers =
    pypi
    testpypi

[testpypi]
repository: https://test.pypi.org/legacy/
username: __token__
password: pypi-AgENd...your-token-here

[pypi]
repository: https://upload.pypi.org/legacy/
username: __token__
password: pypi-AgENd...your-token-here

Set ~/.pypirc permissions to be readable only by you:

chmod 600 ~/.pypirc

If you still get 403:

  • Verify you used the Test PyPI token (tokens are separate between test and prod).
  • Check for typos or truncated tokens when copying.
  • Make sure the token hasn't been deleted or expired.
  • Confirm you're pointing to the correct repository URL (--repository testpypi uses the Test PyPI endpoint).

Basic usage example

from aia_utilities import Redis_Utilities

ru = Redis_Utilities()
ru.write('my:key:1', {'timestamp': 1, 'value': 'hello'})
print(ru.read_all('my:key'))

aia_utilities

Utilities that are shared between Aia microservices.

Human notes (Keep this at all cost)

Change version in two places __init__py setup.cfg

git add setup.cfg src/aia_utilities/init.py git commit -m "Bump version to 0.1.13" git tag v0.1.13 git push && git push --tags

python3 -m pip install --upgrade build twine python3 -m build

ls -la dist
rm dist/0.1.12

export TWINE_USERNAME="token" export TWINE_PASSWORD="pypi-AgENd...your-prod-token" python3 -m twine upload dist/*

python3 -m pip install --upgrade --force-reinstall aia-utilities

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

aia_utilities-0.1.13.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aia_utilities-0.1.13-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file aia_utilities-0.1.13.tar.gz.

File metadata

  • Download URL: aia_utilities-0.1.13.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for aia_utilities-0.1.13.tar.gz
Algorithm Hash digest
SHA256 0b6562eb247a9fc20b55a1a011f7e4e0dc3c81f78d4c2c2f7e9252a62a99655e
MD5 9f8b823a1699ce5b3c8e6f2cffb2c935
BLAKE2b-256 1fd34371c98b894ab62360f20afcb36f68e355592833c92d64673a279d3767af

See more details on using hashes here.

File details

Details for the file aia_utilities-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: aia_utilities-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for aia_utilities-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 ceb16cc9d0eb3a3126d7b14ceeb7c37fa37b24d17788d1b35a244799067f469b
MD5 b49a378a550c536a0303e173da1cdaa2
BLAKE2b-256 e684a575f837f7f74af15ce415af0ee79d8007c0a82b4c0a7db1f896ba780196

See more details on using hashes here.

Supported by

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