This repo contains the work I have completed through Uplimit's Intermediate python. Course taught by Yang Pei and Wendy Ran Wei.
Throughout the course, I have gained proficiency in serveral frameworks and APIs, including:
- FastAPI: Used to build web applications.
- Logging: Python built-in module for debugging.
- Profile: Module to measuring code performance.
- Multiprocessing and multi-threading: Techniques for optimizing code performance.
- SQL Integration: Integrated the web applications with SQLite.
- Advanced Python Concepts: Generators, comprehensions, and higher-order functions for writing efficient, reusable, and maintainable code.
Setting the scene...
You've recently accepted a new role as a Data Engineer at bamazon.com Inc., an e-commerce company based in Dallas. In this role, you'll be a member of the team responsible for building systems that collect, manage, and convert raw data into usable information for data scientists and business analysts.
- Data Processing Module: Developed using generators, comprehensions, and object-oriented programming (OOP) principles.
- Code Optimization: Utilized Python’s multiprocessing module to optimize the performance of the data processing engine.
- FastAPI Server: Created a FastAPI server to track and monitor the progress of data tasks.
- Logging: Implemented multiple log configurations using Python's logging module to enhance monitoring and debugging capabilities.
- Make you're using Python version >= 3.9.0
- Install all the modules
pip install -r requrirements.txt
Generate test data (useful for unit testing code)
python generate_data.py --type tst
Generate small data (useful for quick testing of logic)
python generate_data.py --type sml
Generate big data (actual data)
python generate_data.py --type bg
PYTHONPATH=../ pytest test.py -s
PYTHONPATH=../ pytest test.py
# Run on `test` data
PYTHONPATH=../ python main.py --type tst
# Run on `small` data
PYTHONPATH=../ python main.py --type sml
# Run on the `big` data
PYTHONPATH=../ python main.py --type bg
PYTHONPATH=.. uvicorn server:app --workers 2
or
fastapi run server.py
Thank you so much to Yang Pei, Wendy Ran Wei, and other Uplimit's staff member for making this awesome course.
