Skip to main content

A practical Python CLI toolkit for developers: file, text, time, network, and data utilities.

Project description

quicktools

A practical Python CLI toolkit for developers — file, text, time, network, and data utilities at your fingertips.

Installation

pip install quicktools

Or from source:

git clone https://github.com/quicktools/quicktools.git
cd quicktools
pip install -e .

Quick Start

quicktools --help
quicktools file --help
quicktools text --help
quicktools time --help
quicktools network --help
quicktools data --help

Modules

1. File Tools (quicktools file)

Command Description
rename Batch rename files with find/replace or regex
search Search and replace text across files
split Split large files by lines or size
encoding Convert file encoding (UTF-8, GBK, etc.)

Examples:

# Batch rename: replace "old" with "new" in all .txt files
quicktools file rename "*.txt" --find "old" --replace "new"

# Regex rename: add prefix
quicktools file rename "*.jpg" --find "^(.*)$" --replace "photo_\1" --regex --dry-run

# Search and replace in Python files
quicktools file search "src/**/*.py" --find "deprecated_func" --replace "new_func"

# Split a 10GB log file into 100MB chunks
quicktools file split bigfile.log --size 100M --output-dir ./chunks/

# Convert GBK to UTF-8
quicktools file encoding data.csv --from gbk --to utf-8 --output data_utf8.csv

2. Text Tools (quicktools text)

Command Description
json Format or validate JSON
base64 Base64 encode/decode
regex Test regular expressions
stats Text statistics (chars, words, lines)

Examples:

# Format JSON from file
quicktools text json data.json --indent 4 --sort-keys

# Validate JSON from stdin
cat response.json | quicktools text json - --validate

# Base64 encode
quicktools text base64 encode "Hello World"

# Base64 decode
echo "SGVsbG8gV29ybGQ=" | quicktools text base64 decode -

# Test regex
quicktools text regex "\d{4}-\d{2}-\d{2}" "Date: 2024-01-15"

# Text statistics
quicktools text stats README.md

3. Time Tools (quicktools time)

Command Description
ts Convert between timestamp and datetime
calc Date calculations (add/subtract days, diff)
tz Timezone conversion
now Show current time

Examples:

# Convert timestamp to datetime
quicktools time ts 1704067200

# Convert datetime to timestamp
quicktools time ts "2024-01-01 00:00:00"

# Current timestamp
quicktools time ts

# Add 30 days to a date
quicktools time calc 2024-01-01 --add 30

# Days between two dates
quicktools time calc 2024-01-01 --diff 2024-12-31

# Convert UTC to Asia/Shanghai
quicktools time tz "2024-01-01 12:00" --from UTC --to Asia/Shanghai

# Current time in UTC
quicktools time now --utc

4. Network Tools (quicktools network)

Command Description
url URL encode/decode
portscan TCP port scanner
http Quick HTTP request test

Examples:

# URL encode
quicktools network url encode "hello world & more"

# URL decode
quicktools network url decode "hello%20world%20%26%20more"

# Scan common ports
quicktools network portscan example.com

# Scan specific ports
quicktools network portscan 192.168.1.1 --ports 80,443,3000-4000

# HTTP GET request
quicktools network http https://httpbin.org/json

# HTTP POST with data
quicktools network http https://httpbin.org/post --method POST --data '{"key":"value"}' -H "Content-Type:application/json"

5. Data Tools (quicktools data)

Command Description
convert Convert between CSV and JSON
dedup Remove duplicate lines
generate Generate random test data

Examples:

# CSV to JSON
quicktools data convert data.csv --to json --output data.json

# JSON to CSV
quicktools data convert data.json --to csv --output data.csv

# Remove duplicate lines
quicktools data dedup logs.txt --output clean.txt

# Generate random CSV
quicktools data generate csv --count 100 --columns "id,name,email,age,city"

# Generate random JSON
quicktools data generate json --count 50

# Generate random names
quicktools data generate names --count 20

# Generate random numbers
quicktools data generate numbers --count 100

# Generate random dates
quicktools data generate dates --count 30

Requirements

  • Python 3.8+

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

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

quicktoolbelt-0.1.0.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

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

quicktoolbelt-0.1.0-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file quicktoolbelt-0.1.0.tar.gz.

File metadata

  • Download URL: quicktoolbelt-0.1.0.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for quicktoolbelt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 170e72db31695eee8edcb61a8b4ba0f053f4f2ab02412fd075b5474f08364e41
MD5 9141c6df10b4342ec348b25709b63e8b
BLAKE2b-256 583969dfbb3fcf44aa740ab525cb7fd0d0f0d26141881d972df5562532aed4b7

See more details on using hashes here.

File details

Details for the file quicktoolbelt-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: quicktoolbelt-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for quicktoolbelt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7c9f51d66d77e10564a0f04e42e4598793403db3264070591efd176dc79f377d
MD5 ee022d18dd10e5224eb529f56215fcf7
BLAKE2b-256 478a1f4906aed2eccf8df4cf026435f87a62e0c9b114c3b42572f96f845b14c7

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