Skip to main content

Library to access todo.txt-like task lists

Project description

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.

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

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.

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