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

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.2
File Size Uploaded
nontrinsic-1.2.2.tar.gz 9.8 kB Details

Built distribution (wheel)

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

Total release size: 20.0 kB

Release files / nontrinsic-1.2.2.tar.gz

Download URL nontrinsic-1.2.2.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
707dcfcf43a3aa18b0b0c932e747d7e81b2f3a1488268fe0a3c1861d01943883
BLAKE2b-256 checksum
How to use checksums
e0124363a407c5c497f19843127aeee9e2874c10e9b2728ae9c61ded567c026d
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.2-py3-none-any.whl

Download URL nontrinsic-1.2.2-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db243b5309082a198736215b0c4a2e9e36339863b18013b5426a80a05b00b02d
BLAKE2b-256 checksum
How to use checksums
50fe0dbaec5f19dbe1fd9f4528d6cbc511d486828b93ca2ac72ce245cdda94a4
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