Skip to main content

Tiny Python client for the Fresh Jots API. Append-only notebooks for cron jobs, deploy scripts, and bots.

Project description

freshjots — Python

Tiny Python client for the Fresh Jots API. One file, no runtime dependencies (uses urllib from stdlib).

Install

pip install freshjots

Use

from freshjots import Client

# Reads FRESHJOTS_TOKEN from the environment by default.
client = Client()

# Append text to a note (creates it if missing).
client.append("cron-jobs-prod", "backup ok")

# Read a note's body.
print(client.note("cron-jobs-prod")["plain_body"])

# List your notes.
for note in client.notes():
    print(f"{note['filename']}\t{note['title']}")

# Create a note. The API derives the filename from the title — for a
# note addressable by an exact filename, use append() instead.
created = client.create(title="Research 2026 Q2", body="Initial outline.")
print(created["filename"])  # server-derived stream name

The whole API is four methods: notes(), note(filename), create(title, body), append(filename, text). note() and create() return the note dict directly (no {"note": …} wrapper); notes() returns the list.

Errors

Any non-2xx response raises freshjots.ApiError with status, code, message, and (when present) details:

from freshjots import ApiError

try:
    client.append("huge", "x" * 5_000_000)
except ApiError as e:
    print(f"{e.status} {e.code}: {e}")
    # 413 content_too_large: body exceeds the per-note 3 MB cap

Stable error codes: unauthenticated, forbidden, not_found, validation_failed, cap_exceeded, storage_cap_exceeded, content_too_large, content_type_mismatch, rate_limited. Full list: https://freshjots.com/docs.

Auth

Mint a token at https://freshjots.com/settings/api_tokens (Dev or Dev-pro tier required). Set it once:

export FRESHJOTS_TOKEN=<your-token>

Or pass explicitly:

Client(token="mn_…")

License

MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

freshjots-1.0.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

freshjots-1.0.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file freshjots-1.0.1.tar.gz.

File metadata

  • Download URL: freshjots-1.0.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for freshjots-1.0.1.tar.gz
Algorithm Hash digest
SHA256 8ecc7342197036c067047f32079dcf421fce43fc6affc2717ae446046ebabff4
MD5 66a8a3e5cde018b3b556276e9c4ff7ab
BLAKE2b-256 de1f310ee68a01a0df3255424e05681e28711558ad26a937bee569b2bbc2a737

See more details on using hashes here.

File details

Details for the file freshjots-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: freshjots-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for freshjots-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e2f95a3db3bf443357af54277ab41d7a51df104482f299fab1a827be9efcb466
MD5 9d672cf0e72b4abf88262150143faf4e
BLAKE2b-256 c395f19a451ed96b758d848db57f6105c17621ee2905fb8065aaf2942ec76815

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page