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

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

Built distribution (wheel)

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

Total release size: 18.1 kB

Release files / nontrinsic-1.1.14.tar.gz

Download URL nontrinsic-1.1.14.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
20727a69a68293bb8b640ffabac82ecc08b0a7bc4a3aaa34932a1bfeedac192e
BLAKE2b-256 checksum
How to use checksums
37ca52508094e1cb6dbdbccde11d25ae54ad3302fc772c0e727a949fec9c57aa
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.14-py3-none-any.whl

Download URL nontrinsic-1.1.14-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1aa8f344e790526edb9b0307fbd8964757a51e568b9f18669e5446f123f277a9
BLAKE2b-256 checksum
How to use checksums
65d5c6b048e0111b7fa37e8ba1c1e2049143ebb89c3fef76d197facb6d272210
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