Skip to content

Releases: yezz123/fastapi-tag

1.0.0

09 Mar 06:53
1b51f3d
Compare
Choose a tag to compare

1.0.0 ✨

We are thrilled to announce the release of fastapi-tag version 1.0.0, a significant milestone in our journey. This release brings about several important changes and enhancements, including the drop of Pydantic version 1 and Python 3.6-3.7 support. Below, we outline the key updates and improvements.

Major Changes 🚑️

1. Migration to Pydantic v2 & Drop support for python 3.6 & 3.7

  • Feature: fastapi-tag now exclusively supports Pydantic version 2, as implemented in PR #6
  • Impact: Users must update their code to align with the changes introduced in Pydantic v2.

For detailed information on the changes introduced in this release, please refer to the Full Changelog.

0.0.1

27 Feb 21:19
e45a0a2
Compare
Choose a tag to compare

Features 🎉

  • Add a tag to your API, which can be used to filter the API documentation.
  • Add a description to your API, which can be used to describe the API.
  • Add a version to your API, which can be used to describe the version of the API and app.
  • Provide some other features like:
    • API_id: A unique identifier for the API.
    • Audience: The audience of the API (e.g. public, internal, external).
  • Tested in Python 3.6 and up.
  • Last Version of FastAPI 🚀

Usage 📚

  • To Identify the Metadata of your API:
from fastapi import FastAPI
from fastapi_tag.base.model import Contact, Metadata, Version
from fastapi_tag.core.application import Application

app = FastAPI()

def metadata(app):
    return Metadata(
        title="Hello World",
        version=Version(app="v0.1.1", api="v0.1.0"),
        description="A simple example of a FastAPI application.",
        contact=Contact(
            name="name",
            url="http://test.com",
            email=None
        ),
        api_id="49786b4b-1889-46ec-bd72-27f332436e6f",
        audience="company-internal",
    )

def app(metadata):
    return Application("", metadata)
  • We have also a Problem class that depends on:

    • title: The title of the problem.
    • status: The status code of the problem.
    • detail: A human-readable explanation specific to this occurrence of the problem.
    • instance: A URI reference that identifies the specific occurrence of the problem.
    • type: A URI reference that identifies the problem type.
  • NameSpace is a decorator that adds a route generator to the namespace object.

for example:

from fastapi_tag.router.routers import Namespace

route = Namespace([])