Command Line Application
1. Overview
In this group assignment, you will work collaboratively to develop a command-line application in Python that integrates with a public API (or implement your own).
You'll build this application using your chosen API that provides real-time or recent data in some areas, e.g. finance, health, or government.
This assignment aims to give you practical experience in API integration, version control with Git, dependency management, and containerisation processes.
2. Requirements
2.1 Application:
- Implement your application in Python
- The application will have a command-line interface that lets users interact with it (e.g., by passing parameters to retrieve specific data)
- The command-line interface should:
- have one subcommand help - to display available subcommands/options
- have one subcommand list - to list type of data available from your application
- have one feature/option for each member of your group
- have friendly comman-line interface, not a direct translation from your API request
- Can run your application from docker
2.2 Version Control:
- Use Git for version control, and collaborate on a shared repository on GitHub.
- Use GitHub flow for branch strategy, i.e. the main branch contains your production-ready code.
- There must be one branch called main for stable code
- There must be one called named list for list subcommand
- There must be one branch for each subcommand/feature of the command-line interface, one from each member of your group
2.3 Container
- Create
Dockerfile
(s) for your application
- Create
compose.yml
for your application
2.4 Documentation:
Create a README.md
file that should have clear documentation on:
- how to set up environment
- install dependencies
- use the application
Include instructions on how to configure environment variables if necessary for API keys (if any).
You may use README template (standard) from The Documentation Compendium.
2.5 API Selection:
Choose any public API of your interest, see some examples from a list below.
Use your chosen API to fetch data and process it in a meaningful way for end-users.
Examples of Public APIs
Below are some public APIs in different areas such as finance, health, government, and general data sources.
Some of these may provide data relevant to Thailand, while others offer global data.
- Thailand Government Open Data Portal - https://data.go.th
- Ministry of Commerce Public Data - https://data.moc.go.th/OpenData/Products
- Bank of Thailand API - https://apiportal.bot.or.th/bot/public/
- World Bank Open Data - https://data.worldbank.org
- World Bank API - https://datahelpdesk.worldbank.org/knowledgebase/articles/889392-api-documentation
- World Trading Data API (Stock market and financial data): - https://www.worldtradingdata.com/
- Fixer.io (Currency conversion) - https://fixer.io
- Open Exchange Rates API - https://openexchangerates.org/
- Currency Exchange Rates API https://exchangeratesapi.io/
- Alpha Vantage (Financial markets data) - https://www.alphavantage.co
- CoinGecko API (Cryptocurrency data) - https://www.coingecko.com/en/api
- Yelp Fusion API (Business and restaurant data) - https://www.yelp.com/developers
- FRED Economic Data API - https://fred.stlouisfed.org/docs/api/fred/
- OpenWeatherMap API (Weather data) - https://openweathermap.org/api
- UN Comtrade Database (Global trade data) - https://comtrade.un.org/data
- NASA API (Space and science data) - https://api.nasa.gov
- WHO (World Health Organization) Data API - https://apps.who.int/gho/data/node.resources
- Global Health Observatory API (WHO) - https://www.who.int/data/gho/info/gho-odata-api
- COVID-19 API (Global COVID-19 data) - https://covid19api.com
- OpenStreetMap API (Mapping and geographic data) - https://www.openstreetmap.org
- Global Forest Watch API (Environmental and forest data) - https://www.globalforestwatch.org
- Open Food Facts API (Global food data) - https://world.openfoodfacts.org/data
- OpenAQ (Air Quality Data API) - https://docs.openaq.org/
- Open Library API (Books data) - https://openlibrary.org/developers/api
- Google Books API - https://developers.google.com/books
- Jikan API (Anime and manga data) - https://jikan.moe
- Unsplash Image API - https://unsplash.com/developers
- Thailand Energy Information (EPPO) - https://www.eppo.go.th/index.php/th/ (Requires adaptation and parsing of available data sources)
- IP Geolocation API - https://ipgeolocation.io/documentation.html
- OpenCage Geocoder API - https://opencagedata.com/api
- News API (Global news) - https://newsapi.org
- GitHub API (Repository and developer activity data) - https://docs.github.com/en/rest
- Twitter API (Social media data) - https://developer.twitter.com/en/docs/twitter-api
- Spotify API (Music data) - https://developer.spotify.com
3. Deliverables
-
Git Repository:
There must be NO virtual environment directory, e.g. NO venv
, in any repository.
-
Python Code:
- The complete Python codebase of your command-line application.
- Dependencies managed via pip or other tools.
-
Container:
Dockerfile
(s) appropriately create docker image for your application
compose.yml
file to provide environment to run your application
-
Documentation:
-
Presentation: