> For the complete documentation index, see [llms.txt](https://docs.arkannis.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.arkannis.net/programming/python/classic-python/structure-projects.md).

# Structure Projects

## Simple Project:

1. One file for tiggering minimal functionality: `run.py`

```python
import constants as const
import helpers

# Triggering the entire project
# Do this by python run.py

def run():
	primes = helpers.calculate_primes(start=const.START, finish=const.FINISH)
	print(primes)
	
# Calling the run function:
if __name__ == '__main__':
	run()
```

1. Functions and other such stuff in `helpers.py`

```python
import constants as const

# Functions that are going to help calculate prime numbers
def is_prime(num):
	if num > 1:
		for n in range(2, num):
			if num % n != 0:
				continue
			else:
				return False
	return True

def calculate_primes(start, finish):
	primes = []
	for n in range(start, finish):
		if is_prime(n) and not in c.SKIP_RANGE:
			primes.append(n)
	return primes
```

1. `constants.py` are variables that do not change

```python
# Useful variables that are going to be used
START = 1
FINISH = 100
SKIP_RANGE = range(20, 50)
```

## Complex Project:

1. Folder `email` contains the email sending feature for the application
2. Folder `prime_calculation` contains the prime calculation functionality
3. `run.py` is in the main folder and is responsible for starting up the project


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.arkannis.net/programming/python/classic-python/structure-projects.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
