From e957135c8a895193830877db89c88ed57456cfae Mon Sep 17 00:00:00 2001
From: Dosenpfand
Date: Mon, 9 Oct 2023 11:33:09 +0200
Subject: [PATCH] Cleanup remnants of name change (#236)
---
.github/ISSUE_TEMPLATE/bug_report.md | 6 +++---
CONTRIBUTING.md | 8 ++++----
README.md | 8 ++++----
fastapi_restful/cbv.py | 2 +-
fastapi_restful/timing.py | 4 ++--
pyproject.toml | 2 +-
6 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 1e86bcbb..d92d7019 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -27,13 +27,13 @@ If applicable, add screenshots to help explain your problem.
**Environment:**
- OS: [e.g. Linux / Windows / macOS]
- - FastAPI Utils, FastAPI, and Pydantic versions [e.g. `0.3.0`], get them with:
+ - FastAPI RESTful, FastAPI, and Pydantic versions [e.g. `0.3.0`], get them with:
```Python
-import fastapi_utils
+import fastapi_restful
import fastapi
import pydantic.utils
-print(fastapi_utils.__version__)
+print(fastapi_restful.__version__)
print(fastapi.__version__)
print(pydantic.utils.version_info())
```
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 87e16144..852548af 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -6,7 +6,7 @@ Once you've cloned the repository, here are some guidelines to set up your envir
### Set up the development environment
-After cloning the repository, you can use `poetry` to create a virtual environment:
+After cloning the repository, you can use `poetry` to create a virtual environment:
```console
$ make develop
@@ -25,15 +25,15 @@ Once the virtual environment is created, you can activate it with:
$ poetry shell
```
-To check if this worked, try running:
+To check if this worked, try running:
```console
$ which python
-some/directory/fastapi-utils-SOMETHING-py3.X/bin/python
+some/directory/fastapi-restful-SOMETHING-py3.X/bin/python
```
-If the output of this command shows the `python` binary in a path containing `fastapi-utils` somewhere in the name
+If the output of this command shows the `python` binary in a path containing `fastapi-restful` somewhere in the name
(as above), then it worked! 🎉
!!! tip
diff --git a/README.md b/README.md
index 83700976..fab5f716 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@
-
+
@@ -41,7 +41,7 @@ This package includes a number of utilities to help reduce boilerplate and reuse
* **Resource Class**: Create CRUD with ease the OOP way with `Resource` base class that lets you implement methods quick.
* **Class Based Views**: Stop repeating the same dependencies over and over in the signature of related endpoints.
-* **Response-Model Inferring Router**: Let FastAPI infer the `response_model` to use based on your return type annotation.
+* **Response-Model Inferring Router**: Let FastAPI infer the `response_model` to use based on your return type annotation.
* **Repeated Tasks**: Easily trigger periodic tasks on server startup
* **Timing Middleware**: Log basic timing information for every request
* **OpenAPI Spec Simplification**: Simplify your OpenAPI Operation IDs for cleaner output from OpenAPI Generator
@@ -52,12 +52,12 @@ This package includes a number of utilities to help reduce boilerplate and reuse
It also adds a variety of more basic utilities that are useful across a wide variety of projects:
* **APIModel**: A reusable `pydantic.BaseModel`-derived base class with useful defaults
-* **APISettings**: A subclass of `pydantic.BaseSettings` that makes it easy to configure FastAPI through environment variables
+* **APISettings**: A subclass of `pydantic.BaseSettings` that makes it easy to configure FastAPI through environment variables
* **String-Valued Enums**: The `StrEnum` and `CamelStrEnum` classes make string-valued enums easier to maintain
* **CamelCase Conversions**: Convenience functions for converting strings from `snake_case` to `camelCase` or `PascalCase` and back
* **GUID Type**: The provided GUID type makes it easy to use UUIDs as the primary keys for your database tables
-See the [docs](https://fastapi-restful.netlify.app/) for more details and examples.
+See the [docs](https://fastapi-restful.netlify.app/) for more details and examples.
## Requirements
diff --git a/fastapi_restful/cbv.py b/fastapi_restful/cbv.py
index d4d4b5b7..5353c96c 100644
--- a/fastapi_restful/cbv.py
+++ b/fastapi_restful/cbv.py
@@ -28,7 +28,7 @@ def cbv(router: APIRouter, *urls: str) -> Callable[[Type[T]], Type[T]]:
will be populated with an instance created using FastAPI's dependency-injection.
For more detail, review the documentation at
- https://fastapi-utils.davidmontague.xyz/user-guide/class-based-views/#the-cbv-decorator
+ https://fastapi-restful.netlify.app/user-guide/class-based-views//#the-cbv-decorator
"""
def decorator(cls: Type[T]) -> Type[T]:
diff --git a/fastapi_restful/timing.py b/fastapi_restful/timing.py
index bcf44fda..64458e8d 100644
--- a/fastapi_restful/timing.py
+++ b/fastapi_restful/timing.py
@@ -22,7 +22,7 @@
from starlette.routing import Match, Mount
from starlette.types import Scope
-TIMER_ATTRIBUTE = "__fastapi_utils_timer__"
+TIMER_ATTRIBUTE = "__fastapi_restful_timer__"
def add_timing_middleware(
@@ -59,7 +59,7 @@ def record_timing(request: Request, note: str | None = None) -> None:
This can help profile which piece of a request is causing a performance bottleneck.
Note that for this function to succeed, the request should have been generated by a FastAPI app
- that has had timing middleware added using the `fastapi_utils.timing.add_timing_middleware` function.
+ that has had timing middleware added using the `fastapi_restful.timing.add_timing_middleware` function.
"""
timer = getattr(request.state, TIMER_ATTRIBUTE, None)
if timer is not None:
diff --git a/pyproject.toml b/pyproject.toml
index 68cfca7e..a4413e32 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -6,7 +6,7 @@ license = "MIT"
authors = ["Yuval Levi "]
readme = "README.md"
homepage = "https://fastapi-restful.netlify.app"
-repository = "https://github.com/yuval9313/fastapi-utils"
+repository = "https://github.com/yuval9313/FastApi-RESTful"
documentation = "https://fastapi-restful.netlify.app"
keywords = ["fastapi", "OOP", "RESTful"]
classifiers = [