---
title: "Discussion on \"Build an Easy Rest API in python with Swagger UI\" | Hashnode"
description: "Discussion on \"Build an Easy Rest API in python with Swagger UI\". There is a lot of article describing the reason to use python or the way to install the environment. I'll recommend you the following article, which is quite complete : \nhttps://auth0.com/blog/developing-restful-apis-with-python-and-flask/\nIn this ar..."
url: "https://hashnode.com/posts/build-an-easy-rest-api-in-python-with-swagger-ui/61ae038d9dc5a836391baab2"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Build an Easy Rest API in python with Swagger UI](https://devops.dina.ch/build-an-easy-rest-api-in-python-with-swagger-ui?utm_source=hashnode&utm_medium=feed)

There is a lot of article describing the reason to use python or the way to install the environment. I'll recommend you the following article, which is quite complete : https://auth0.com/blog/developing-restful-apis-with-python-and-flask/ In this ar...

Dec 6, 2021 · 3 min read · devops.dina.ch  
Read the article

-   [#rest-api](https://hashnode.com/tag/rest-api)
-   [#python](https://hashnode.com/tag/python)
-   [#flask](https://hashnode.com/tag/flask)

## Written by

[DINA](https://hashnode.com/@cisel)

@cisel · Switzerland

  
[View profile](https://hashnode.com/@cisel)

DevOps team

## Responses 1

Markdown supported · ⌘↵ to post

[Shacoca](https://hashnode.com/@Shacoca)

[Dec 9, 2021](https://hashnode.com/posts/build-an-easy-rest-api-in-python-with-swagger-ui/61ae038d9dc5a836391baab2/comment/61b1fa9d6a81cf6b31dfc341)

Hi, Trying your example, I had CORS problem using the rest api. Found on [flask-cors.readthedocs.io/en/latest](https://flask-cors.readthedocs.io/en/latest/) : In the simplest case, initialize the Flask-Cors extension with default arguments in order to allow CORS for all domains on all routes.

```
from flask import Flask
from flask_cors import CORS

app = Flask(__name__)
CORS(app)
```

If it can help someone :)
