Skip to content

Commit

Permalink
notices
Browse files Browse the repository at this point in the history
  • Loading branch information
mariofix committed Sep 21, 2024
1 parent 4a17c5c commit 1f671e3
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 32 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Fastapi-Merchants
# Merchants

This project is under development, not for production use.

[![PyPI version](https://badge.fury.io/py/merchants.svg)](https://badge.fury.io/py/merchants)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
Expand Down Expand Up @@ -28,7 +30,7 @@ flexible interface for handling different payment methods.
## Installation

```bash
poetry add fastapi-merchants
poetry add merchants
```

## Quick Start
Expand Down
76 changes: 76 additions & 0 deletions pyproject-poetry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
[tool.poetry]
name = "merchants"
version = "2024.9.16"
description = "A unified payment processing toolkit for Starlette/FastAPI applications"
authors = ["Mario Hernandez <mariofix@proton.me>"]
readme = "README.md"
license = "MIT"
repository = "https://github.com/mariofix/merchants"
homepage = "https://mariofix.github.io/merchants"
keywords = [
"payment",
"psp",
"payment-gateway",
"payment-integration",
"payment-processing",
"payment-hub",
"payment-platform",
"fastapi",
"starlette",
]
packages = [{ include = "merchants" }, { include = "alembic" }]
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
]

[tool.poetry.dependencies]
python = "^3.10"
thankyou = "^0.0.3"
pendulum = "^3.0.0"
httpx = "^0.27.0"
python-slugify = "^8.0.4"

alembic = "^1.13.2"
sqlalchemy = "^2.0.35"
sqlalchemy-utils = "^0.41.2"

fastapi = { extras = ["all"], version = "^0.114.2" }
starlette-admin = { version = "^0.14.1" }
pytest-asyncio = "^0.24.0"


[tool.poetry.group.dev.dependencies]
pytest = "^8.3.3"
coverage = "^7.6.1"
black = "^24.8.0"
pre-commit = "^3.8.0"
rich = "^13.7.1"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"


[tool.pytest.ini_options]
addopts = "-ra"
testpaths = ["tests"]
python_files = ["test*.py"]


[tool.black]
line-length = 119
target-version = ['py310']
include = '\.pyi?$'

[tool.ruff]
line-length = 119
target-version = "py310"

[tool.bandit]
exclude_dirs = ["tests"]
skips = ["B101", "B601"]
63 changes: 33 additions & 30 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
[tool.poetry]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "merchants"
version = "2024.9.16"
description = "A unified payment processing toolkit for Starlette/FastAPI applications"
authors = ["Mario Hernandez <mariofix@proton.me>"]
authors = [{ name = "Mario Hernandez", email = "mariofix@proton.me" }]
readme = "README.md"
license = "MIT"
repository = "https://github.com/mariofix/merchants"
homepage = "https://mariofix.github.io/merchants"
license = { file = "LICENSE" }
requires-python = ">=3.10"
keywords = [
"payment",
"psp",
Expand All @@ -18,7 +21,6 @@ keywords = [
"fastapi",
"starlette",
]
packages = [{ include = "merchants" }, { include = "alembic" }]
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.10",
Expand All @@ -27,29 +29,34 @@ classifiers = [
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"thankyou>=0.0.3",
"pendulum>=3.0.0",
"httpx>=0.27.0",
"python-slugify>=8.0.4",
"alembic>=1.13.2",
"sqlalchemy>=2.0.35",
"sqlalchemy-utils>=0.41.2",
"fastapi[all]>=0.114.2",
"starlette-admin>=0.14.1",
]

[tool.poetry.dependencies]
python = "^3.10"
thankyou = "^0.0.3"
pendulum = "^3.0.0"
httpx = "^0.27.0"
python-slugify = "^8.0.4"

alembic = "^1.13.2"
sqlalchemy = "^2.0.35"
sqlalchemy-utils = "^0.41.2"

fastapi = { extras = ["all"], version = "^0.114.2" }
starlette-admin = { version = "^0.14.1" }
pytest-asyncio = "^0.24.0"
[project.optional-dependencies]
dev = [
"pytest>=8.3.3",
"coverage>=7.6.1",
"black>=24.8.0",
"pre-commit>=3.8.0",
"rich>=13.7.1",
"pytest-asyncio>=0.24.0",
]

[project.urls]
Homepage = "https://mariofix.github.io/merchants"
Repository = "https://github.com/mariofix/merchants"

[tool.poetry.group.dev.dependencies]
pytest = "^8.3.3"
coverage = "^7.6.1"
black = "^24.8.0"
pre-commit = "^3.8.0"
rich = "^13.7.1"
[tool.hatch.build.targets.wheel]
packages = ["merchants", "alembic"]


[tool.pytest.ini_options]
Expand All @@ -70,7 +77,3 @@ target-version = "py310"
[tool.bandit]
exclude_dirs = ["tests"]
skips = ["B101", "B601"]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
5 changes: 5 additions & 0 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@
from fastapi.testclient import TestClient

from merchants.StarletteApp import fastapi_route
from merchants.version import __version__

app = FastAPI()
app.include_router(fastapi_route)
client = TestClient(app)


def test_version():
assert __version__ == "2024.9.16"


def test_update_payment_success():
response = client.post(
"/update-payment/test_integration", json={"key": "value"}, headers={"Custom-Header": "Test"}
Expand Down

0 comments on commit 1f671e3

Please sign in to comment.