Skip to content

a6002k/telco-api-automation-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telco API Automation Demo

Project Status: 🚀 Demonstration (Ready for review)

This repository demonstrates skills in automating API requests for the telecommunications industry. The code here is a demonstration of capability, based on real commercial experience.


Business Case

In the telecom industry (especially MVNO/IoT), there is a constant need to automate a wide range of tasks:

  • Activating/deactivating SIM cards
  • Checking a SIM's balance and status
  • Topping up data or credit
  • Pulling data usage statistics (CDRs)
  • Bulk-updating information for thousands of devices

This demo project shows how I approach solving these problems using Python. It specifically demonstrates the core task of:

  1. Securely handling API credentials.
  2. Fetching data from an API endpoint.
  3. Exporting that data into a business-friendly Excel report.

This same logic can be expanded to automate any of the other tasks listed above.


🛠️ Tech Stack

  • Python
  • Requests: For making HTTP requests
  • Pandas: For data manipulation and Excel exporting
  • Openpyxl: The engine for writing .xlsx files
  • Python-dotenv: For securely managing configuration (API URLs, keys)

🚀 How to Run This Demo

Step 1: Get the Code

You have two options.

Option A: Download ZIP (Easiest, no Git needed)

  1. On this GitHub page, click the green < > Code button.
  2. Select Download ZIP.
  3. Unzip the file to a folder on your computer.

Option B: Git Clone (For developers)

git clone https://github.com/a6002k/telco-api-automation-demo.git
cd telco-api-automation-demo

Step 2: Create & Activate Environment

(It is highly recommended to create a virtual environment venv)

1. Create the environment (Only ONCE):

python -m venv venv

2. Activate the environment (Do this EVERY TIME you open CMD):

On Windows (CMD):

venv\Scripts\activate

On Linux / Mac:

source venv/bin/activate

(You will see (venv) appear at the start of your command line)

Step 3: Install Dependencies

(Make sure your environment is activated first!)

You only need to do this once for your environment.

pip install -r requirements.txt

Step 4: Create your .env file

(Make sure your environment is activated!)

This script reads your private API URL from a .env file. A template (example.env) is provided. You just need to copy it.

In your Windows Command Prompt:

copy example.env .env

On Linux / Mac:

cp example.env .env

(Now you can edit the .env file with your real URL if needed.)

Step 5: Run the Script

(Make sure your environment is activated!)

python safe_demo_telco_api.py

⚙️ How It Works

  • If DEMO_API_URL is found in .env: The script will attempt to fetch live data from that URL.
  • If DEMO_API_URL is not found: The script will run in "safe mode" using built-in mock data (you won't see any network requests).
  • Result: An .xlsx file (e.g., sims_data_20251111T161700Z.xlsx) will be created in the folder.

⭐ Hire Me

I am available for freelance projects (fixed-price, hourly) in API automation, integration, and Python backend development.

About

Safe demo of Telecom API automation with Python — fetch SIM data, parse JSON, export XLSX

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages