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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file cow_api-0.1.1.tar.gz.

File metadata

  • Download URL: cow_api-0.1.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for cow_api-0.1.1.tar.gz
Algorithm Hash digest
SHA256 08441fd8f2ed667a4ae79d7ac1abe3fd46160494e54e27dde24004b1c1611f08
MD5 61c5f4d4a236475d9edc600e8bbe7a61
BLAKE2b-256 de0f8637e4e7d6d7f08e1487cf6e0fc0e9106639d4a8cf79e9edf37183339ed6

See more details on using hashes here.

File details

Details for the file cow_api-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: cow_api-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for cow_api-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2fa83f967aa51b101524cbd0209be6f23eb66ae1dfb8935bb192238f6a4e7534
MD5 abf20d250c29fc1142a2442577459aca
BLAKE2b-256 fb14532cb6ced9ae916af01e82827371cbd227c39936c83d383de1e80d9db53a

See more details on using hashes here.

Supported by

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