Skip to main content
filegen
========================================

.. code-block:: python

fg = Filegen()
with fg.dir("foo"):
with fg.file("hello.txt") as wf:
wf.write("hello")

with fg.dir("bar"):
with fg.file("x") as wf:
wf.write("x")

with fg.file("bye.txt") as wf:
wf.write("bye")

fg.to_python_module()


generated files ::

foo/
├── __init__.py
├── bar
│ ├── __init__.py
│ └── x
├── bye.txt
└── hello.txt

making file-structure generating application
----------------------------------------

Using `FilegenApplication` for creating file structure generating command.
Writing a script file such as below.

.. code-block:: python

# myscript.py
if __name__ == "__main__":
from filegen import Filegen, FilegenApplication

fg = Filegen()
with fg.dir("foo"):
with fg.file("bar.py") as wf:
wf.write("# this is comment file")
with fg.file("readme.txt") as wf:
wf.write("# foo")
FilegenApplication().run(fg)

then.

.. code-block:: shell

$ python myscript.py --action=string /tmp
d:/tmp
d:/tmp/foo
f:/tmp/foo/bar.py
# this is comment file
d:/tmp/foo
f:/tmp/foo/readme.txt
# foo

$ python myscript.py --action=string /foo/bar
d:/foo/bar
d:/foo/bar/foo
f:/foo/bar/foo/bar.py
# this is comment file
d:/foo/bar/foo
f:/foo/bar/foo/readme.txt
# foo

Metadata

Release files for filegen 0.2.1

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

Source distribution (sdist)

Source distribution for filegen 0.2.1
File Size Uploaded Provenance Actions
filegen-0.2.1.tar.gz 11.0 kB Without provenance Details for filegen-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 26.5 kB

Release files / filegen-0.2.1.tar.gz

Download URL filegen-0.2.1.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ff7425a6322e5d7cb4d221e1d543dca6973fbca11a1b35e09221afc96218b2d9
BLAKE2b-256 checksum
How to use checksums
fccbf6b2b13b08afb291e8603e31724510cfb9935d3d017eaa4adc908eb90e4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / filegen-0.2.1-py3-none-any.whl

Download URL filegen-0.2.1-py3-none-any.whl
Size 15.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d65d36b8896e1a29800af5060ef6cd4b75ea8a93e751908de221a19f089ba938
BLAKE2b-256 checksum
How to use checksums
022e4959e582cbdde46ec2fbe4ca0b77f492e9dda2ee140e856696c17418db73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for filegen 0.2.1

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.

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