0% found this document useful (0 votes)
3 views1 page

Python API for Excel Data Insertion

The document outlines a practical task for creating a Python API that reads data from an Excel or CSV file and inserts it into a database. It specifies the creation of two tables, Employee and Company, with a one-to-many relationship, and requires the use of serializers to handle data insertion without SQL or ORM queries in loops. The task is to manage employee details and company names as specified in the provided Excel file.

Uploaded by

katip24324
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Python API for Excel Data Insertion

The document outlines a practical task for creating a Python API that reads data from an Excel or CSV file and inserts it into a database. It specifies the creation of two tables, Employee and Company, with a one-to-many relationship, and requires the use of serializers to handle data insertion without SQL or ORM queries in loops. The task is to manage employee details and company names as specified in the provided Excel file.

Uploaded by

katip24324
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

BrainerHub Solutions

Practical subject: Python


Duration: 6 Hours

1. Create an API in python which will read from an excel/csv file and insert
data into the database. (you can use any python framework of your
choice).
2. For database, you need to create two table : Employee and Company. (You
can use any database of your choice).
3. You need to establish one to many relationship between Company and
Employee table where one company can have multiple employees.
4. The Excel file provided with this task has Employee details mentioned like
first_name, last_name, phone_number, etc.
5. From Excel file, you need to store the company_name in the "Company"
table and use its id as foreign key into the Employee table.
6. The API you will create should read this excel file with serializers and
insert the data into both the table without using any "SQL" or "ORM" query
in loop.

You might also like