Skip to main content

A utility library for common Python tasks.

Project description

HyperNova SDK

A utility library for common Python tasks.

Installation

pip install hypernova-sdk

Quick Start

import hypernova_sdk

print(hypernova_sdk.__version__)

Display Utilities

Rich-powered logging and output helpers.

import hypernova_sdk

# Print helpers
hypernova_sdk.print_success("It worked!")
hypernova_sdk.print_warning("Watch out!")
hypernova_sdk.print_error("Something went wrong")
hypernova_sdk.print_info("Here's some info")
hypernova_sdk.print_header("Section Title")

# Tables
hypernova_sdk.print_table("Name", "Age", rows=[("Alice", "30"), ("Bob", "25")])

# Trees
hypernova_sdk.print_tree("Project", ("src", ["a.py", "b.py"]), "README.md")

# Progress bar
with hypernova_sdk.progress() as prog:
    task = prog.add_task("Downloading...", total=100)
    for i in range(100):
        prog.update(task, advance=1)

# Spinner
with hypernova_sdk.status("Loading..."):
    data = fetch_data()

# Timer
with hypernova_sdk.timer("Operation"):
    do_work()

# Or use the logger directly
from hypernova_sdk import nova_log
nova_log.success("Done!")

Cache Utilities

Thread-safe caching utilities with optional TTL.

@ttl_cache(seconds=60) — Decorator

Cache function results with a time-to-live expiry.

import time
from hypernova_sdk import ttl_cache

@ttl_cache(seconds=30)
def fetch_data(url):
    # Simulate slow I/O
    time.sleep(2)
    return {"data": "value"}

print(fetch_data("https://api.example.com"))  # 2s delay
print(fetch_data("https://api.example.com"))  # instant (cached)

@memoize — Decorator

Simple unbounded memoization (no expiry, lifetime of process).

from hypernova_sdk import memoize

@memoize
def expensive_computation(x, y):
    return x ** y

print(expensive_computation(2, 10))  # computed
print(expensive_computation(2, 10))  # cached

TTLCache — Class

Manual key-value cache with TTL and LRU eviction.

from hypernova_sdk import TTLCache

cache = TTLCache(ttl=60, maxsize=256)

cache.set("user:1", {"name": "Alice", "role": "admin"})
print(cache.get("user:1"))  # {'name': 'Alice', 'role': 'admin'}

cache.clear()  # remove all entries

License

MIT License

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

hypernova_sdk-1.0.0.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

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

hypernova_sdk-1.0.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file hypernova_sdk-1.0.0.tar.gz.

File metadata

  • Download URL: hypernova_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hypernova_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a753ef008d184347a7daa51ef652773d8526e4ab090260a90d87a0be3a29a512
MD5 8880064b32412c27c8520c51d6f8d4bd
BLAKE2b-256 28eaacfb8e193b8281dfaadcf95e9e7b996ec9906873e5c3d224a4c193b36c98

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypernova_sdk-1.0.0.tar.gz:

Publisher: publish.yml on risqiikhsani/novasdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hypernova_sdk-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: hypernova_sdk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hypernova_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0bf4f707b7bd7a98e3022d68a8fff5328f9625d7fa5a8f737e494da0b7e39387
MD5 ae74046aab2fe90e809242ff56193733
BLAKE2b-256 4c5695b5d2245dd21c5cbd12fa953344cc75bd69ee7212e93078f4e8c1ec1edf

See more details on using hashes here.

Provenance

The following attestation bundles were made for hypernova_sdk-1.0.0-py3-none-any.whl:

Publisher: publish.yml on risqiikhsani/novasdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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