Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

133
Views
How to call Fast api file upload route

I have written fast API to upload a file but in my new requirement, I have to create CLI to upload a file for that I am calling route function.

@app.post("/uploadfile/")
async def create_upload_file(file: Uploadfile =File(...));
      pd.DataFrame = pd.read_csv(file.file)
      return True

create_upload_file(file=UploadFile(input_file_path))

when i tried to read that file like : claims: pd.DataFrame = pd.read_csv(file.file) i am getting following error

No columns to parse from file

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

you can read the csv as following:

from io import BytesIO
df = pd.read_csv(BytesIO(file.file.read()))
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!