Skip to main content

octk

Utilities

uniquify

Given a file path, uniquify will return a unique file path by appending a number to the file name if necessary.

example_dir
├── foo.txt
└── bar
    └── baz.txt
from octk import uniquify

uniquify('example_dir/foo.txt')
# 'example_dir/foo(1).txt'

uniquify('example_dir/bar')
# 'example_dir/bar(1)'

uniquify('example_dir/bar.txt')
# 'example_dir/bar.txt'

pytree.FileTree

Created to work around the fact that Windows' tree does not allow you to exclude folders or filter files by extension.

from octk import FileTree

tree = FileTree('example_dir')
tree.print_tree()
example_dir
├── foo.txt
└── bar
    └── baz.txt

make_draft_email()

Given the basic information of an email (i.e. subject, content, & recipients), make_draft_email() will create a valid .eml file that can be opened and sent by an email client.

from octk import make_draft_email

make_draft_email(
    out_path='out/folder/example.eml',
    subject='Hello, World!',
    content='This is a test email.',
    recipients=['example@hello.com']
)

Metadata

Release files for octk 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for octk 0.1.0
File Size Uploaded
octk-0.1.0.tar.gz 9.9 kB Details

Built distribution (wheel)

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

Total release size: 19.7 kB

Release files / octk-0.1.0.tar.gz

Download URL octk-0.1.0.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e79c25b0c9e780e934886dc20901c7d0374e0739af2b78e1fc03d8641caa6eec
BLAKE2b-256 checksum
How to use checksums
ad6c4c49de314c90a4cf2131bb6362ab2b08a2702b8abd912d51a579dcd3c647
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.5

Release files / octk-0.1.0-py3-none-any.whl

Download URL octk-0.1.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19b1b053601bca75fb12c0efa329d035db8c9c2393ddefaafd590951cc71e07d
BLAKE2b-256 checksum
How to use checksums
acf052f40732356b6357dc017c3776b4e34aca224ab23b7e4852adf40aa8f258
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.5

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release 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