# Day 8: Order Service (Python)

* **Learn**: Flask basics, HTTP methods.
* **Task**: Create a Flask app with a /orders endpoint returning "Order Placed." Commit to order branch.

### Daily Tasks 🎉:&#x20;

* Updated jira dashboard
* installed python, pip3, flask
* Created virtual environment
* created `app.py` and executed it with `python3 app.py`&#x20;
* created `requirements.txt`  file

`python3 -m venv venv` `source venv/bin/activate`

```gitignore
# Python Bytecode and Compiled Files
__pycache__/
*.pyc
*.pyo
*.pyd

# Virtual Environments
venv/
env/
.venv/

# Dependency Management
*.egg-info/
dist/
build/
*.egg

# Logs and Temporary Files
*.log
*.log.*
*.tmp

# Environment Variables and Secrets
.env
*.env

# IDE/Editor Files
.idea/
.vscode/
*.swp

# macOS/Windows Junk
.DS_Store
Thumbs.db

# Flask-Specific
instance/
*.sqlite  # If you add a SQLite DB later

# Project-Specific (Optional)
order-service/*.log  # If you add logging later
```

* **\_\_pycache\_\_/, \*.pyc, \*.pyo, \*.pyd**: Ignores Python’s compiled bytecode files generated during runtime.
* **venv/, env/, .venv/**: Excludes virtual environments (you’re not using one yet, but good practice for future).
* **\*.egg-info/, dist/, build/, \*.egg**: Ignores packaging/build artifacts from tools like pip or setuptools.
* **\*.log, \*.log.\*, \*.tmp**: Excludes log and temp files Flask might generate.
* **.env, \*.env**: Prevents committing sensitive environment variables (e.g., API keys).
* **.idea/, .vscode/**: Ignores IDE settings (e.g., PyCharm, VS Code).
* **instance/, \*.sqlite**: Flask-specific—ignores instance folder or SQLite databases if used later.
* **order-service/\*.log**: Custom rule for your Order Service logs (optional now, useful later).


---

# Agent Instructions: 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:

```
GET https://charan-techjourney.gitbook.io/charan-techjournal/50-days-of-devops-ecommerce-microservices/project-daily-tasks/day-8-order-service-python.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
