{"id":28160,"library":"ry","title":"ry","description":"ry (\"rust | python\") is a high-performance Python library providing Rust-accelerated bindings for hashing, encoding, UUID generation, HTTP client, and more. Current version 0.0.91. Frequent releases (multiple per month), pre-1.0 rapid development.","status":"active","version":"0.0.91","language":"python","source_language":"en","source_url":"https://github.com/jessekrubin/ry","tags":["hashing","uuid","encoding","http-client","rust","pyo3"],"install":[{"cmd":"pip install ry","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"The main module is accessed via `import ry`. All submodules are accessed via `ry.xxx`.","wrong":"","symbol":"ry","correct":"import ry"},{"note":"Hash is a class inside the main ry module; direct import works but `import ry` is canonical.","wrong":"from ry import Hash","symbol":"ry.Hash","correct":"import ry; hash_obj = ry.Hash()"}],"quickstart":{"code":"import ry\n\n# Generate a UUID v4\nuuid_v4 = ry.uuid4()\nprint(f\"UUID4: {uuid_v4}\")\n\n# Compute SHA-256 hash\nhash_obj = ry.hash(b\"hello\", algorithm=ry.HashAlgorithm.SHA256)\nprint(f\"SHA256: {hash_obj.hex()}\")\n\n# Encode an object to JSON base64\nencoded = ry.json_base64_encode({\"key\": \"value\"})\nprint(f\"Encoded: {encoded}\")\n\n# Decode it\ndecoded = ry.json_base64_decode(encoded)\nprint(f\"Decoded: {decoded}\")\n\n# Use the HTTP client\nclient = ry.Client()\nresponse = client.request(\"GET\", \"https://httpbin.org/get\")\nprint(f\"Status: {response.status_code}\")","lang":"python","description":"Basic operations: UUID generation, hashing, base64 JSON encode/decode, and an HTTP client."},"warnings":[{"fix":"Use asyncio.to_thread() to run ry.Client().request() or use a dedicated async HTTP library.","message":"ry.Client() is a synchronous HTTP client. It uses Python threads and may block the event loop if used in async code. Do not call ry.Client() from async tasks without wrapping in a thread executor.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Pin to a specific version in requirements.txt (e.g., ry==0.0.91). Monitor the changelog before upgrading.","message":"The library is pre-1.0; breaking changes can occur in minor/patch releases. For example, the hash API or encoding functions may change signatures without notice.","severity":"breaking","affected_versions":">=0.0.1"},{"fix":"Use ry.uuid4() for UUID v4. Use ry.uuid7() for UUID v7 if available.","message":"Some older functions like ry.uuid() (without version) may be deprecated in favor of ry.uuid4(). Check current docs for exact deprecations.","severity":"deprecated","affected_versions":">=0.0.80"},{"fix":"Install Rust via rustup (https://rustup.rs) or use a Linux x86_64 system where prebuilt wheels may be provided.","message":"Installation may fail without a Rust toolchain because the library is compiled on-the-fly via PyO3. The wheel distribution is not available for all platforms.","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use `from ry import r#ry.Hash` or simply `import ry; ry.Hash`.","cause":"Hash is not a direct attribute; it's a class inside ry module.","error":"ImportError: cannot import name 'Hash' from 'ry'"},{"fix":"Use `await asyncio.to_thread(client.request, 'GET', url)` or switch to httpx for async.","cause":"ry.Client is synchronous and blocks.","error":"ry.Client() does not support async/await"},{"fix":"Replace `ry.uuid()` with `ry.uuid4()`.","cause":"Function renamed or removed; use ry.uuid4() instead.","error":"AttributeError: module 'ry' has no attribute 'uuid'"},{"fix":"Set `client = ry.Client(verify=False)` or configure custom CA bundle.","cause":"Default TLS settings may be strict.","error":"SSLCertVerificationError when using ry.Client()"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}