Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/examples/cli-typer-base/pygme…
Browse files Browse the repository at this point in the history
…nts-2.15.0
  • Loading branch information
ulises-jeremias authored Sep 20, 2023
2 parents 69c5264 + 0a00334 commit e07a49f
Show file tree
Hide file tree
Showing 93 changed files with 14,260 additions and 50 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
blank_issues_enabled: false
contact_links:
- name: 💬 General Question
url: https://github.com/nanlabs/python-reference/discussions/categories/q-a
url: https://github.com/nanlabs/backend-reference/discussions/categories/q-a
about: Please ask and answer questions as a discussion thread
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ here at [NaN Labs](https://www.nanlabs.com/).

#### Shell Scripting and CLI Tools

- [Python CLI Basic Example](https://github.com/nanlabs/python-reference/tree/main/examples/cli-base) - Basic structure to create a command without passing the python command and the python file's path. _Keywords: Python3, PyCMD_
- [Python CLI with Typer + Rich Example](https://github.com/nanlabs/python-reference/tree/main/examples/cli-typer-base) - Interaction with an external API, to retrieve some currencies exchange rates, make conversion returning styled console output. _Keywords: Python3, Requests, Rich, Typer_
- [Python CLI Basic Example](https://github.com/nanlabs/backend-reference/tree/main/examples/cli-base) - Basic structure to create a command without passing the python command and the python file's path. _Keywords: Python3, PyCMD_
- [Python CLI with Typer + Rich Example](https://github.com/nanlabs/backend-reference/tree/main/examples/cli-typer-base) - Interaction with an external API, to retrieve some currencies exchange rates, make conversion returning styled console output. _Keywords: Python3, Requests, Rich, Typer_

### Backend

#### FastAPI

- [FastAPI Basic Example](https://github.com/nanlabs/python-reference/tree/main/examples/fastapi-base) - Rest API that retrieves mock data using Faker library. _Keywords: Python3, Faker, Factory-Boy, FastAPI, Pydantic_
- [FastAPI Complete CRUD Example](https://github.com/nanlabs/python-reference/tree/main/examples/fastapi-crud) - Rest API that allows to create, read, update and delete employees and companies in the db, besides that, has endpoints to populate the db with Mock Data using faker. _Keywords: Python3, Faker, FastAPI, Pydantic, SQLAlchemy, Alembic, Docker, Docker Compose, PGAdmin, PostgreSQL_
- [FastAPI GraphQL](https://github.com/nanlabs/python-reference/tree/main/examples/fastapi-gql) - GraphQL API that retrieves fake companies using Faker library. _Keywords: Python3, Factory-boy, Faker, FastAPI, Pydantic, Strawberry-graphql_
- [FastAPI Basic Example](https://github.com/nanlabs/backend-reference/tree/main/examples/fastapi-base) - Rest API that retrieves mock data using Faker library. _Keywords: Python3, Faker, Factory-Boy, FastAPI, Pydantic_
- [FastAPI Complete CRUD Example](https://github.com/nanlabs/backend-reference/tree/main/examples/fastapi-crud) - Rest API that allows to create, read, update and delete employees and companies in the db, besides that, has endpoints to populate the db with Mock Data using faker. _Keywords: Python3, Faker, FastAPI, Pydantic, SQLAlchemy, Alembic, Docker, Docker Compose, PGAdmin, PostgreSQL_
- [FastAPI GraphQL](https://github.com/nanlabs/backend-reference/tree/main/examples/fastapi-gql) - GraphQL API that retrieves fake companies using Faker library. _Keywords: Python3, Factory-boy, Faker, FastAPI, Pydantic, Strawberry-graphql_

## Contributing

Expand All @@ -61,13 +61,13 @@ here at [NaN Labs](https://www.nanlabs.com/).

## Contributors

<a href="https://github.com/nanlabs/python-reference/contributors">
<img src="https://contrib.rocks/image?repo=nanlabs/python-reference"/>
<a href="https://github.com/nanlabs/backend-reference/contributors">
<img src="https://contrib.rocks/image?repo=nanlabs/backend-reference"/>
</a>

Made with [contributors-img](https://contrib.rocks).

[cibadge]: https://github.com/nanlabs/python-reference/actions/workflows/ci.yml/badge.svg
[cibadge]: https://github.com/nanlabs/backend-reference/actions/workflows/ci.yml/badge.svg
[licensebadge]: https://img.shields.io/badge/License-MIT-blue.svg
[ciurl]: https://github.com/nanlabs/python-reference/actions/workflows/ci.yml
[licenseurl]: https://github.com/nanlabs/python-reference/blob/main/LICENSE
[ciurl]: https://github.com/nanlabs/backend-reference/actions/workflows/ci.yml
[licenseurl]: https://github.com/nanlabs/backend-reference/blob/main/LICENSE
10 changes: 5 additions & 5 deletions README.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ here at [NaN Labs](https://www.nanlabs.com/).

## Contributors

<a href="https://github.com/nanlabs/python-reference/contributors">
<img src="https://contrib.rocks/image?repo=nanlabs/python-reference"/>
<a href="https://github.com/nanlabs/backend-reference/contributors">
<img src="https://contrib.rocks/image?repo=nanlabs/backend-reference"/>
</a>

Made with [contributors-img](https://contrib.rocks).

[cibadge]: https://github.com/nanlabs/python-reference/actions/workflows/ci.yml/badge.svg
[cibadge]: https://github.com/nanlabs/backend-reference/actions/workflows/ci.yml/badge.svg
[licensebadge]: https://img.shields.io/badge/License-MIT-blue.svg
[ciurl]: https://github.com/nanlabs/python-reference/actions/workflows/ci.yml
[licenseurl]: https://github.com/nanlabs/python-reference/blob/main/LICENSE
[ciurl]: https://github.com/nanlabs/backend-reference/actions/workflows/ci.yml
[licenseurl]: https://github.com/nanlabs/backend-reference/blob/main/LICENSE
71 changes: 47 additions & 24 deletions examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,51 @@
"$schema": "https://raw.githubusercontent.com/nanlabs/awesome-nan/main/examples.schema.json",
"list": [
{
"name": "Python CLI Basic Example",
"url": "https://github.com/nanlabs/python-reference/tree/main/examples/cli-base",
"description": "Basic structure to create a command without passing the python command and the python file's path.",
"tags": ["Examples > DevOps > Shell Scripting and CLI Tools"],
"name": "Golang REST API boilerplate",
"description": "REST API to create, update and retrieve Entities, including graceful shutdown, rate limiting, structured logging, unit tests, integration tests, environment variables, health check and API documentation with swagger. Technologies: Golang 1.19, MongoDB (with Docker Compose), Gorilla Mux, Go Swagger, Tollbooth (rate limiting), Zap (logging), Viper, Mockery, Makefile, Pre-commit, and DockerTest (integration tests).",
"url": "https://github.com/nanlabs/nancy.go/tree/main/examples/golang-todo-rest-crud/",
"tags": ["Apps and Boilerplates"],
"labels": [
"Python3",
"PyCMD"
"Golang",
"REST API",
"MongoDB",
"Gorilla Mux",
"Go Swagger",
"Tollbooth",
"Zap",
"Viper",
"Mockery",
"Makefile",
"Pre-commit",
"Docker",
"Docker Compose",
"DockerTest"
]
},
{
"name": "Python CLI Basic Example",
"url": "https://github.com/nanlabs/backend-reference/tree/main/examples/cli-base",
"description": "Basic structure to create a command without passing the python command and the python file's path.",
"tags": ["Examples > Backend > CLI Tools"],
"labels": ["Python3", "PyCMD"]
},
{
"name": "Python CLI with Typer + Rich Example",
"url": "https://github.com/nanlabs/python-reference/tree/main/examples/cli-typer-base",
"url": "https://github.com/nanlabs/backend-reference/tree/main/examples/cli-typer-base",
"description": "Interaction with an external API, to retrieve some currencies exchange rates, make conversion returning styled console output.",
"tags": ["Examples > DevOps > Shell Scripting and CLI Tools"],
"labels": [
"Python3",
"Requests",
"Rich",
"Typer"
]
"tags": ["Examples > Backend > CLI Tools"],
"labels": ["Python3", "Requests", "Rich", "Typer"]
},
{
"name": "FastAPI Basic Example",
"url": "https://github.com/nanlabs/python-reference/tree/main/examples/fastapi-base",
"url": "https://github.com/nanlabs/backend-reference/tree/main/examples/fastapi-base",
"description": "Rest API that retrieves mock data using Faker library.",
"tags": ["Examples > Backend > FastAPI"],
"labels": [
"Python3",
"Faker",
"Factory-Boy",
"FastAPI",
"Pydantic"
]
"labels": ["Python3", "Faker", "Factory-Boy", "FastAPI", "Pydantic"]
},
{
"name": "FastAPI Complete CRUD Example",
"url": "https://github.com/nanlabs/python-reference/tree/main/examples/fastapi-crud",
"url": "https://github.com/nanlabs/backend-reference/tree/main/examples/fastapi-crud",
"description": "Rest API that allows to create, read, update and delete employees and companies in the db, besides that, has endpoints to populate the db with Mock Data using faker.",
"tags": ["Examples > Backend > FastAPI"],
"labels": [
Expand All @@ -56,7 +64,7 @@
},
{
"name": "FastAPI GraphQL",
"url": "https://github.com/nanlabs/python-reference/tree/main/examples/fastapi-gql",
"url": "https://github.com/nanlabs/backend-reference/tree/main/examples/fastapi-gql",
"description": "GraphQL API that retrieves fake companies using Faker library.",
"tags": ["Examples > Backend > FastAPI"],
"labels": [
Expand All @@ -67,6 +75,21 @@
"Pydantic",
"Strawberry-graphql"
]
},
{
"name": "Stripe Integration with Node.js and TypeScript",
"description": "This project offers a seamless Stripe integration with Node.js and TypeScript, providing a powerful API for managing basic operations like customer creation, checkout sessions, and portal sessions. It empowers developers to effortlessly handle payment-related tasks with the Stripe API.",
"url": "https://github.com/nanlabs/backend-reference/tree/main/examples/stripe-integration-node-typescript/",
"tags": ["Examples > Backend > ThirdParty Integrations > Stripe"],
"labels": [
"Node.js",
"TypeScript",
"Stripe",
"Payment Gateway",
"API",
"Integration",
"Webhooks"
]
}
]
}
File renamed without changes.
38 changes: 38 additions & 0 deletions examples/cli-typer-base/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-added-large-files
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-docstring-first
- id: check-json
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- repo: https://github.com/pycqa/flake8
rev: '3.9.2'
hooks:
- id: flake8
args:
- "--max-line-length=120"
- "--max-complexity=18"
- "--select=B,C,E,F,W,T4,B9"
- "--ignore=E501,W503,F403"
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort (python)
- id: isort
name: isort (cython)
types: [cython]
- id: isort
name: isort (pyi)
types: [pyi]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.32.2
hooks:
- id: markdownlint
2 changes: 1 addition & 1 deletion examples/cli-typer-base/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ click==8.1.3
commonmark==0.9.1
idna==3.4
Pygments==2.15.0
requests==2.28.1
requests==2.31.0
rich==12.6.0
typer==0.6.1
urllib3==1.26.12
38 changes: 38 additions & 0 deletions examples/fastapi-base/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-added-large-files
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-docstring-first
- id: check-json
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- repo: https://github.com/pycqa/flake8
rev: '3.9.2'
hooks:
- id: flake8
args:
- "--max-line-length=120"
- "--max-complexity=18"
- "--select=B,C,E,F,W,T4,B9"
- "--ignore=E501,W503,F403"
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort (python)
- id: isort
name: isort (cython)
types: [cython]
- id: isort
name: isort (pyi)
types: [pyi]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.32.2
hooks:
- id: markdownlint
2 changes: 1 addition & 1 deletion examples/fastapi-base/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ factory-boy==3.2.1
Faker==13.12.1
fastapi==0.78.0
pydantic==1.9.1
starlette==0.19.1
starlette==0.27.0
typing_extensions==4.2.0
uvicorn==0.17.6
38 changes: 38 additions & 0 deletions examples/fastapi-crud/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-added-large-files
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-docstring-first
- id: check-json
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- repo: https://github.com/pycqa/flake8
rev: '3.9.2'
hooks:
- id: flake8
args:
- "--max-line-length=120"
- "--max-complexity=18"
- "--select=B,C,E,F,W,T4,B9"
- "--ignore=E501,W503,F403"
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort (python)
- id: isort
name: isort (cython)
types: [cython]
- id: isort
name: isort (pyi)
types: [pyi]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.32.2
hooks:
- id: markdownlint
2 changes: 1 addition & 1 deletion examples/fastapi-crud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This PoC was made using the following project as base:

- [FastApiBase](https://github.com/nanlabs/python-reference/tree/main/examples/fastapi-base)
- [FastApiBase](https://github.com/nanlabs/backend-reference/tree/main/examples/fastapi-base)

---

Expand Down
2 changes: 1 addition & 1 deletion examples/fastapi-crud/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ PyYAML==6.0
six==1.16.0
sniffio==1.2.0
SQLAlchemy==1.4.39
starlette==0.19.1
starlette==0.27.0
toml==0.10.2
typing_extensions==4.3.0
uvicorn==0.18.2
Expand Down
38 changes: 38 additions & 0 deletions examples/fastapi-gql/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-added-large-files
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-docstring-first
- id: check-json
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- repo: https://github.com/pycqa/flake8
rev: '3.9.2'
hooks:
- id: flake8
args:
- "--max-line-length=120"
- "--max-complexity=18"
- "--select=B,C,E,F,W,T4,B9"
- "--ignore=E501,W503,F403"
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort (python)
- id: isort
name: isort (cython)
types: [cython]
- id: isort
name: isort (pyi)
types: [pyi]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.32.2
hooks:
- id: markdownlint
30 changes: 30 additions & 0 deletions examples/golang-todo-rest-crud/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
#vendor/

# Go workspace file
go.work
.vscode/settings.json

# Environment
.env

/bin/

# Coverage
coverage.txt
Loading

0 comments on commit e07a49f

Please sign in to comment.