Skip to main content

Nontrinsic Python wrapper

docs will be here when i uneep

Usage

Getting nonsense

from nontrinsic import Nontrinsic
non = Nontrinsic()

non.get_random_nonsense() # returns one random nonsense as Nonsense object
non.get_nonsense(uuid) # returns Nonsense object with uuid UUID
non.get_nonsense_image(uuid) # returns NonsensePartialFile with image of nonsense with uuid UUID
non.get_all_nonsense(query, format, before, after) #used to return all nonsenses in NonsenseList object with filters such as query, before and after, (all optional), format can be JSON, CSV or TXT, by default its JSON, CSV and TXT are returned as NonsenseFile objects

Getting Nontrinsic status

non.status # returns NontrinsicStatus object
non.get_status() # returns NontrinsicStatus object
non.update_status() # updates non.status and also returns NontrinsicStatus object

Caching the database

non = Nontrinsic(has_cache = True) # makes Nontrinsic have the database in memory, if something goes wrong, it will fetch nonsense from memory instead of the nontrinsic server
non.cache # you can use all the same methods as regular nontrinsic but its all in memory, also some methods are not implemented

non.cache_nontrinsic() # returns CachedNontrinsic object
non.update_cache() # update non.cache and returns CachedNontrinsic object

Miscellaneous

non.report_nonsense(uuid, reason, details) # reports nonsense with uuid UUID with reason and details

Importing JSON, CSV, TXT files as the database

# json
import json
with open("nonsense.json", "r") as f:
  non = Nontrinsic(json.load(f))

# csv
with open("nonsense.csv", "r") as f:
  non = Nontrinsic.from_csv(f)

# txt
with open("nonsense.txt", "r") as f:
  non = Nontrinsic.from_txt(f) # won't have any information, only the nonsense raw text.

Metadata

Release files for nontrinsic 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nontrinsic 1.2.1
File Size Uploaded
nontrinsic-1.2.1.tar.gz 9.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nontrinsic 1.2.1
File Interpreter ABI Platform
nontrinsic-1.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 19.6 kB

Release files / nontrinsic-1.2.1.tar.gz

Download URL nontrinsic-1.2.1.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
44d38c47e63ddd78d327a122b2e5e96412667287cccde01e2347b962be093103
BLAKE2b-256 checksum
How to use checksums
03d2827376abd13b0c82bd1be4648d23ceee6df5a3d8a29fc60f6b86cfd699f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / nontrinsic-1.2.1-py3-none-any.whl

Download URL nontrinsic-1.2.1-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
52e5c576c54dfdc4f0630e81c690f397aaf4eac7e392cb6e22916e14bba29d10
BLAKE2b-256 checksum
How to use checksums
e0015fe74bc445d5642ae0cb7b81b2fc5c2e3ca321345356e91e39f26cc2e418
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page