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.0

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.0
File Size Uploaded
nontrinsic-1.2.0.tar.gz 9.6 kB Details

Built distribution (wheel)

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

Total release size: 19.6 kB

Release files / nontrinsic-1.2.0.tar.gz

Download URL nontrinsic-1.2.0.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
885984e335698841eb4ec783789c85a85f0adf5bd6f6f6c2c908b201b4dea776
BLAKE2b-256 checksum
How to use checksums
5595a84165eefec81faee9ba5ff436f03643c092ec0d34b390579d6e85efe656
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.0-py3-none-any.whl

Download URL nontrinsic-1.2.0-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f890d83e6ab7f896e9afbc357beb798e7699961592bb248322f9a65f6fabd645
BLAKE2b-256 checksum
How to use checksums
1c5f5150b8a286d93b13c9cdaa4ffe4ce6463651715f7bc906f324afea7a01e9
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