stephen schuresko 074d2fc481
All checks were successful
Build and Push to Private Registry101 / build (push) Successful in 10s
docs: update README to include instructions for alternative database location using DATABASE_URL
2025-02-17 23:12:26 -05:00
2025-02-16 16:12:58 -05:00

Posts API

This is the Posts API project, a simple API for managing blog posts.

Table of Contents

Installation

  1. Clone the repository:
    git clone https://git.fairfaxmedia.net/posts-api/papi-py.git
    
  2. Navigate to the project directory:
    cd papi-py
    
  3. Install the dependencies:
    pip install -r requirements.txt
    

Usage

To start the server, run:

python3 papi.py

To start with an alternative database location(postgresql) Use the following

DATABASE_URL='postgresql+psycopg2://user:password@hostname/database_name' python3 papi.py

Endpoints

GET /posts

Retrieve a list of all posts.

POST /posts

Create a new post.

GET /posts/{id}

Retrieve a specific post by ID.

PUT /posts/{id}

Update a specific post by ID.

DELETE /posts/{id}

Delete a specific post by ID.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Description
No description provided
Readme 194 KiB
Languages
Python 67.8%
Makefile 16.5%
Smarty 13.8%
Dockerfile 1.9%