# A nice workflow for creating Python projects with AI

By Corey J. Gallon · 2024-10-15 · https://gallon.me/a-nice-workflow-for-creating-python-projects-with-ai.html

---

First, create a new project using poetry

```bash
poetry new asciinema-editor
```

This gives you a nice, clean new project structure.

```bash
.
├── README.md
├── asciinema_editor
│   ├── __init__.py
├── poetry.lock
├── pyproject.toml
└── tests
    └── __init__.py
```

Now, let the model know that you have this project structure and ask it to write you code.  Claude does a nice job of providing the relevant bits to make your project work nicely.

- e.g. `__main__.py` (see [TIL](|filename|20241015 - __main__.py file in a project.md) on this)
- Exposes the relevant main function in `__init__.py` making it easier to import and use the package in other scripts if needed.
