Coding task · Python course · Module 6: Async and FastAPI

Asynchronous CRUD

Create an asynchronous function for adding a species to the database.

Task

Write an async function create_species that takes db (AsyncSession) and species_data, adds it to the database and commits.