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

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.1.13
File Size Uploaded
nontrinsic-1.1.13.tar.gz 8.9 kB Details

Built distribution (wheel)

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

Total release size: 18.1 kB

Release files / nontrinsic-1.1.13.tar.gz

Download URL nontrinsic-1.1.13.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a04f1519f371c11ffe38520170b141cb98b8e0777c1899773c08ab014fba9a36
BLAKE2b-256 checksum
How to use checksums
f11c02ec8bc70c3338b1525478bf13413b56dcf0ab72d22d3ac93ed7e26c4741
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.1.13-py3-none-any.whl

Download URL nontrinsic-1.1.13-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd308bc4509f3a313c839553eb5cadb5b2c881d4ebcd506a77b13ef39a012d7b
BLAKE2b-256 checksum
How to use checksums
f34506596acc98b81f5ab98cb90a107dbc3449f2eae083ea93652f93cc88fde8
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