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
- Fetch all cows or a single cow based on its ID.
- Create a new cow.
- Update the details of an existing cow.
- Delete a cow based on its ID.
- 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)
| File | Size | Uploaded | |
|---|---|---|---|
| cow_api-0.1.1.tar.gz | 4.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|