{"id":28469,"library":"xocto","title":"xocto","description":"A collection of Python service utilities used by Kraken Technologies, providing helpers for strings, dates, storage, retries, and more. Current version 9.0.3, requires Python >=3.9. Released regularly as part of Kraken's internal tooling.","status":"active","version":"9.0.3","language":"python","source_language":"en","source_url":"https://github.com/octoenergy/xocto","tags":["utilities","kraken","storage","retry","strings","dates"],"install":[{"cmd":"pip install xocto","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"","wrong":"","symbol":"set_storage","correct":"from xocto import storage; storage.set_storage(...)"},{"note":"","wrong":"","symbol":"local_storage","correct":"from xocto.storage import local_storage"},{"note":"","wrong":"","symbol":"retry","correct":"from xocto import retry; retry.retry(...)"},{"note":"","wrong":"","symbol":"strings","correct":"from xocto import strings"},{"note":"","wrong":"","symbol":"dates","correct":"from xocto import dates"}],"quickstart":{"code":"import os\nfrom xocto import storage, strings, dates\n\nstorage.set_storage(storage.LocalStorage())\n\n# Example: generate a slug\ntitle = \"Hello World!\"\nslug = strings.slugify(title)\nprint(slug)  # hello-world\n\n# Example: get current UTC time\nnow = dates.utc_now()\nprint(now)\n","lang":"python","description":"Basic usage showing storage setup, string slugification, and UTC date helper."},"warnings":[{"fix":"Call storage.set_storage(storage.LocalStorage()) at startup. Update imports from old names.","message":"In version 9.0.0, the storage module's API changed. set_storage must be called before any storage operations, and the storage classes were renamed (e.g., LocalStorage instead of LocalFileStorage).","severity":"breaking","affected_versions":">=9.0.0"},{"fix":"Switch to the new names: LocalStorage, S3Storage, etc.","message":"The old storage classes (e.g., LocalFileStorage, S3Storage) are deprecated in favour of LocalStorage, S3Storage, etc. without the 'File' prefix.","severity":"deprecated","affected_versions":">=8.0.0 <9.0.0"},{"fix":"Always call storage.set_storage(...) at application startup.","message":"If you use xocto.storage without calling set_storage first, all storage operations will fail with an unhelpful error.","severity":"gotcha","affected_versions":">=9.0.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use from xocto import storage; storage.LocalStorage (or S3Storage, etc.).","cause":"Renamed or removed storage class.","error":"AttributeError: module 'xocto' has no attribute 'LocalFileStorage'"},{"fix":"Call storage.set_storage(storage.LocalStorage()) with an instance.","cause":"set_storage called without a storage backend instance.","error":"TypeError: set_storage() missing 1 required positional argument: 'backend'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}