literati
Jupyter notebook combines prose with code in a notebook.
literati
combines prose with code in a markdown file.
Usage
File Watching Mode
Run
literati.
Create a <file_name>.md with your favorite editor.
Write code interwoven with markdown:
> Time for some fair dinkum mischief...
Accessing the mainframe to _compile some yarn_.
```python
def hello():
print("G'day, World!!")
```
Whenever you save your file,
literati
transcribes your file to py/<file_name>.py stripping all the markdown.
Only the code remains.
Run python py/<file_name>.py to run your code.
One-time Conversion
If you just want to convert markdown files without watching for changes,
use
md_to_py:
Copy $ md_to_py input_directory output_directory
This will process all markdown files in input_directory and save the
extracted code to Python files in output_directory.
Options
File Watching: - literati --path /custom/path - Monitor a different
directory - literati --output-dir custom_output - Use a different
output directory
One-time Conversion: - md_to_py --input-dir /path/to/markdown -
Directory containing markdown files -
md_to_py --output-dir custom_output - Directory for output Python
files (defaults to ‘py’)
The Why
I wanted to try the following pattern of working with LLMs:
- context is your code
- when you want to make changes or additions, provide the context to your LLM
- ask for modifications
- update the context to reflect the new information
Context and code, always in sync. For you and your LLM.
Installation
Install latest from the GitHub repository:
$ pip install git+https://github.com/radekosmulski/literati.git
or from pypi
$ pip install literati
Install literati in Development mode
# make sure literati package is installed in development mode
$ pip install -e .
# make changes under nbs/ directory
# ...
# compile to have changes apply to literati
$ nbdev_prepare
Metadata
Release files for literati 0.0.6
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 | Actions |
|---|---|---|---|---|
| literati-0.0.6.tar.gz | 9.9 kB | Without provenance | Details for literati-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| literati-0.0.6-py3-none-any.whl | Python 3 | none | any | Details for literati-0.0.6-py3-none-any.whl |
Total release size: 19.0 kB
Release files / literati-0.0.6.tar.gz
| Download URL | literati-0.0.6.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a526ceb3010f9a1835453d8521afc5cef554a27fa856d4a5b7b6142e32ad3ef
|
|
BLAKE2b-256 checksum How to use checksums |
2fa5962a48fe40957cd6d3b0cd0f8e2380da82e95dbc4c0f6fbab03bfd4dd69f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Release files / literati-0.0.6-py3-none-any.whl
| Download URL | literati-0.0.6-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e002c765fea22cfa8c799984e195b50b756baddf69625932360b25691ffd82e
|
|
BLAKE2b-256 checksum How to use checksums |
aaad33b59c00e4e5e6d42f4ac130a4ddb3b197791576977700351e38a1fb64ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Security for literati 0.0.6
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.