Skip to main content

pytodotxt

A tiny library to access todo.txt-like task lists.

Installation

To install pytodotxt, you can follow these steps to clone the repository, and install the program.

pip install pytodotxt

That’s all there is to do.

Documentation

You can find the full documentation at https://vonshednob.cc/pytodotxt/doc/.

Example usage

Here’s an example how to open a todo.txt file and print the description of all tasks that are not marked as completed:

import pytodotxt


todotxt = pytodotxt.TodoTxt('todo.txt')
todotxt.parse()

for task in todotxt.tasks:
    if not task.is_completed:
        print(task.description)

Here is how you add a new task to an existing todo.txt file:

import datetime

import pytodotxt

todotxt = pytodotxt.TodoTxt('todo.txt')
todotxt.parse()

task = pytodotxt.Task()
task.parse('This is a new task')
task.creation_date = datetime.date.today()

todotxt.tasks.append(task)

todotxt.save()

Is this project still active?

You can consider this project actively maintained until: 2026-07-01.

If today is past that date, please consider this project no longer maintained and do not expect issues or questions to be answered by the maintainers.

Download files

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

Source Distribution

pytodotxt-3.1.0.tar.gz (123.7 kB view details)

Uploaded Source

File details

Details for the file pytodotxt-3.1.0.tar.gz.

File metadata

  • Download URL: pytodotxt-3.1.0.tar.gz
  • Upload date:
  • Size: 123.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for pytodotxt-3.1.0.tar.gz
Algorithm Hash digest
SHA256 00ed7e6ca22a8d7dc0f8f0c3424765209d20808a76c06963a1c43d917506e5fe
MD5 2f95756bf0a4cc1fe2e4c140efacb62f
BLAKE2b-256 d8595449ac80f2a85c1156d6226b841497577563585fdeae8115f17e9abdea65

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

3.1.0 This release

1 file

3.0.0

2 files

2.0.0.post1

2 files

2.0.0

2 files

1.5.0

2 files

1.4.3

2 files

1.4.2

2 files

1.4.1

2 files

1.4.0

2 files

1.3.0

2 files

1.2.1

2 files

1.2.0

2 files

1.1.0

2 files

1.0.7

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

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