Metadata-Version: 2.1
Name: picocog
Version: 1.0.0
Summary: A Python implementation of the picocog library (original Java version by Chris Ainsley)
Home-page: UNKNOWN
License: MIT
Project-URL: Bug Tracker, https://github.com/fontoura/picocog-python/issues
Project-URL: Source Code, https://github.com/fontoura/picocog-python
Keywords: code generation
Platform: UNKNOWN
Description-Content-Type: text/markdown
License-File: LICENSE

# Overview
A Python implementation of the picocog library (original Java version by Chris Ainsley).

# Basic usage

The API of this library mostly matches its Java counterpart, but using Python naming conventions. The following code sample generates a 'Hello World' program in Python using this library.

```python
from picocog import PicoWriter

writer = PicoWriter()
writer.writeln("""def hello():""")
writer.indent_right()
writer.writeln("""print('Hello World')""")
writer.indent_left()
writer.writeln("")
writer.writeln("""hello()""")

print(writer.to_string())
```


