All Projects → miguelgrinberg → microblog-api

miguelgrinberg / microblog-api

Licence: MIT license
A modern (as of 2022) Flask API back end.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to microblog-api

openapi-generator-go
An opinionated OpenAPI v3 code generator for Go. Use this to generate API models and router scaffolding.
Stars: ✭ 42 (-80.73%)
Mutual labels:  openapi
swakka
A Scala library for creating Swagger definitions in a type-safe fashion wth Akka-Http
Stars: ✭ 74 (-66.06%)
Mutual labels:  openapi
apispec-webframeworks
Web framework plugins for apispec (formally in apispec.ext).
Stars: ✭ 25 (-88.53%)
Mutual labels:  openapi
ssc-restapi-client
Communicate with Fortify Software Security Center through REST API in java, a swagger generated client
Stars: ✭ 13 (-94.04%)
Mutual labels:  openapi
Ktor-OpenAPI-Generator
Ktor OpenAPI/Swagger 3 Generator
Stars: ✭ 203 (-6.88%)
Mutual labels:  openapi
serverless-openapi-documentation
Serverless 1.0 plugin to generate OpenAPI V3 documentation from serverless configuration
Stars: ✭ 83 (-61.93%)
Mutual labels:  openapi
whook
Build strong and efficient REST web services.
Stars: ✭ 18 (-91.74%)
Mutual labels:  openapi
mapi-action
🤖 Run a Mayhem for API scan in GitHub Actions
Stars: ✭ 16 (-92.66%)
Mutual labels:  openapi
laravel-openapi
Generate OpenAPI specification for Laravel Applications
Stars: ✭ 269 (+23.39%)
Mutual labels:  openapi
HibiAPI
一个实现了多种常用站点的易用化API的程序 / A program that implements easy-to-use APIs for a variety of commonly used sites.
Stars: ✭ 427 (+95.87%)
Mutual labels:  openapi
minter-go-sdk
Minter Blockchain Golang SDK, 💳 wallet, 🧾 transactions, gRPC and HTTP clients 🌐 https://t.me/MinterGoSDK
Stars: ✭ 12 (-94.5%)
Mutual labels:  openapi
AlipayOpenapiCpp
支付宝开放平台的C\C++版接入示例代码,包含加签验签\网络请求\参数组装\报文解析等等;仅供商户或开发者参考使用;
Stars: ✭ 44 (-79.82%)
Mutual labels:  openapi
advanced-spring-scaffold
This project provides an advanced baseline to help you kick start a Spring project.
Stars: ✭ 21 (-90.37%)
Mutual labels:  openapi
connexion-example-redis-kubernetes
Connexion Example REST Service with Redis Store
Stars: ✭ 24 (-88.99%)
Mutual labels:  openapi
OpenAlchemy
Define SQLAlchemy models using the OpenAPI specification.
Stars: ✭ 39 (-82.11%)
Mutual labels:  openapi
main
Mocks Server monorepo
Stars: ✭ 109 (-50%)
Mutual labels:  openapi
sbt-guardrail
Principled code generation from OpenAPI specifications
Stars: ✭ 24 (-88.99%)
Mutual labels:  openapi
n26-api
Unofficial N26 Bank API documentation
Stars: ✭ 41 (-81.19%)
Mutual labels:  openapi
yamlinc
Compose multiple YAML files into one with $include tag. Split Swagger/OpenAPI into multiple YAML files.
Stars: ✭ 103 (-52.75%)
Mutual labels:  openapi
dataclasses-jsonschema
JSON schema generation from dataclasses
Stars: ✭ 145 (-33.49%)
Mutual labels:  openapi

microblog-api

Build status codecov

A modern (as of 2022) Flask API back end.

Deploy to Heroku

Click the button below to deploy the application directly to your Heroku account.

Deploy

Deploy on your Computer

Setup

Follow these steps if you want to run this application on your computer, either in a Docker container or as a standalone Python application.

git clone https://github.com/miguelgrinberg/microblog-api
cd microblog-api
cp .env.example .env

Open the new .env file and enter values for the configuration variables.

Run with Docker

To start:

docker-compose up -d

The application runs on port 5000 on your Docker host. You can access the API documentation on the /docs URL (i.e. http://localhost:5000/docs if you are running Docker locally).

To populate the database with some randomly generated data:

docker-compose run --rm microblog-api bash -c "flask fake users 10 && flask fake posts 100"

To stop the application:

docker-compose down

Run locally

Set up a Python 3 virtualenv and install the dependencies on it:

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Create the database and populate it with some randomly generated data:

flask db upgrade
flask fake users 10
flask fake posts 100

Run the application with the Flask development web server:

flask run

The application runs on localhost:5000. You can access the API documentation at http://localhost:5000/docs.

Troubleshooting

On macOS Monterey and newer, Apple decided to use port 5000 for its AirPlay service, which means that the Microblog API server will not be able to run on this port. There are two possible ways to solve this problem:

  1. Disable the AirPlay Receiver service. To do this, open the System Preferences, go to "Sharing" and uncheck "AirPlay Receiver".
  2. Move Microblog API to another port:
    • If you are running Microblog API with Docker, add a MICROBLOG_API_PORT=4000 line to your .env file. Change the 4000 to your desired port number.
    • If you are running Microblog API with Python, start the server with the command flask run --port=4000.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].