Skip to main content

Cow API using FastAPI

Project description

Cow Assignment

Description

This is a simple cow API that allows you to create, read, update, and delete cows using a RESTful API built with FastAPI.

Features

  1. Fetch all cows or a single cow based on its ID.
  2. Create a new cow.
  3. Update the details of an existing cow.
  4. Delete a cow based on its ID.
  5. Filter cows based on their attributes.

Installation

Install the package using pip:

pip install cow_api

Alternatively, you can clone the repository and install the requirements using pip:

pip install -r requirements.txt

Usage

After installation, you can run the application using uvicorn:

uvicorn cow_api.main:app --reload Then navigate to http://localhost:8000/docs in your web browser to access the API.

Testing

Tests are located in the tests directory. To run tests, navigate to the root directory of the application and execute the following command:

pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cow_api-0.1.1.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

cow_api-0.1.1-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page