Skip to content

Commit

Permalink
fix: rename for pypi (#3)
Browse files Browse the repository at this point in the history
Signed-off-by: Keming <kemingy94@gmail.com>
  • Loading branch information
kemingy authored Jan 20, 2024
1 parent 1e72280 commit 96b1ad3
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PY_SOURCE=reapi tests examples
PY_SOURCE=defspec tests examples

dev:
@pip install -e .[dev]
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# reapi
# defspec

Create the OpenAPI spec and document from `dataclass`, `attrs`, `msgspec`, etc.

Expand All @@ -14,7 +14,7 @@ You can use this project as a low-level component or a drop-in module when you d
## Installation

```bash
pip install reapi
pip install defspec
```

## Examples
Expand All @@ -34,7 +34,7 @@ You can run the above examples and open the OpenAPI document in your browser:
from dataclasses import dataclass
from typing import List

from reapi import OpenAPI
from defspec import OpenAPI


@dataclass
Expand Down
4 changes: 4 additions & 0 deletions defspec/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from defspec.spec import OpenAPI, OpenAPIInfo
from defspec.template import RenderTemplate

__all__ = ["OpenAPI", "OpenAPIInfo", "RenderTemplate"]
File renamed without changes.
2 changes: 1 addition & 1 deletion reapi/spec.py → defspec/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

class OpenAPIInfo(msgspec.Struct, kw_only=True):
title: str = "OpenAPI"
description: str = "OpenAPI generated by reapi"
description: str = "OpenAPI generated by defspec"
version: str = "0.1.0"


Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/falcon_openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import msgspec
from falcon import App, Request, Response

from reapi import OpenAPI, RenderTemplate
from defspec import OpenAPI, RenderTemplate


class JSONRequest(msgspec.Struct):
Expand Down
2 changes: 1 addition & 1 deletion examples/flask_openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from flask import Flask, request

from reapi import OpenAPI, RenderTemplate
from defspec import OpenAPI, RenderTemplate


@dataclass
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[project]
name = "reapi"
name = "defspec"
dynamic = ["version"]
description = "Argument parsing with structured class."
authors = [{ name = "Keming", email = "kemingy94@gmail.com" }]
Expand All @@ -20,7 +20,7 @@ dev = [
"attrs~=23.2",
]
[project.urls]
"Homepage" = "https://github.com/kemingy/reapi"
"Homepage" = "https://github.com/kemingy/defspec"
[project.scripts]

[build-system]
Expand All @@ -36,6 +36,6 @@ target-version = "py38"
select = ["E", "F", "G", "B", "I", "SIM", "TID", "PL", "RUF"]
ignore = ["E501"]
[tool.ruff.lint.isort]
known-first-party = ["reapi"]
known-first-party = ["defspec"]
[tool.ruff.lint.pylint]
max-args = 10
4 changes: 0 additions & 4 deletions reapi/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/test_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import msgspec
import pytest

from reapi import OpenAPI, OpenAPIInfo
from defspec import OpenAPI, OpenAPIInfo

APIParameter = namedtuple(
"APIParameters", ["request", "response", "query", "header", "cookie"]
Expand Down

0 comments on commit 96b1ad3

Please sign in to comment.