※下の方に日本語の説明があります
English description
This package provides a simple way to initialize files. You no longer need to check if its directory exists before creating a file!!
How to use
from fileinit import fileinit
fileinit(
"./test.txt", # filename
overwrite = True,
init_str = "Hello, World!!\n"
)
Output result: test.txt
Hello, World!!
- If you omit the argument
init_str, the file will be initialized with empty string"". - If you set the argument
overwritetoFalseand if the file already exists, this package will not do anything.
日本語の説明
ファイルを簡単に初期化するためのパッケージです。 もうファイル作成の前にディレクトリの存在を確認する必要はありません!
簡単な使い方
from fileinit import fileinit
fileinit(
"./test.txt", # filename
overwrite = True,
init_str = "Hello, World!!\n"
)
出力結果: test.txt
Hello, World!!
- 引数
init_strを省略した場合、ファイルは空白文字列""で初期化されます。 - 引数
overwriteをFalseに設定すると、既に同名のファイルが存在する場合は新たなファイルは作成されません。
Metadata
Release files for fileinit 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| fileinit-0.0.2.tar.gz | 2.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fileinit-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.2 kB
Release files / fileinit-0.0.2.tar.gz
| Download URL | fileinit-0.0.2.tar.gz |
|---|---|
| Size | 2.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
03da849287d5394c5109eae35a4cd778b9b483bfa253e5d68ee1903b15fba3f8
|
|
BLAKE2b-256 checksum How to use checksums |
e2a0d5587b1d41cadb92f690a02c9ca06b0e4618b09beb32d116b4c596c8b299
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.8
|
Release files / fileinit-0.0.2-py3-none-any.whl
| Download URL | fileinit-0.0.2-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3e23c6e69110ef3a90fc3dff7928facea5cd02e72034e0a5172fbcbf5a4741ab
|
|
BLAKE2b-256 checksum How to use checksums |
dadd0b30f32e6b7770384aefae9c0864090972d3c5ffb13ae02a4b5146382845
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.8
|
Security for fileinit 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.