Skip to main content

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

Release files for cow-api 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cow-api 0.1.1
File Size Uploaded
cow_api-0.1.1.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cow-api 0.1.1
File Interpreter ABI Platform
cow_api-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.9 kB

Release files / cow_api-0.1.1.tar.gz

Download URL cow_api-0.1.1.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
08441fd8f2ed667a4ae79d7ac1abe3fd46160494e54e27dde24004b1c1611f08
BLAKE2b-256 checksum
How to use checksums
de0f8637e4e7d6d7f08e1487cf6e0fc0e9106639d4a8cf79e9edf37183339ed6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.7

Release files / cow_api-0.1.1-py3-none-any.whl

Download URL cow_api-0.1.1-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2fa83f967aa51b101524cbd0209be6f23eb66ae1dfb8935bb192238f6a4e7534
BLAKE2b-256 checksum
How to use checksums
fb14532cb6ced9ae916af01e82827371cbd227c39936c83d383de1e80d9db53a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.7

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page