API with high performance to create a simple blog and Auth using OAuth2 ⛏

Overview

DOGEAPI

Star Badge

DogeAPI

API with high performance built with FastAPI & SQLAlchemy, help to improve connection with your Backend Side to create a simple blog and Cruds with OAuth2PasswordBearer

Getting Started

Prerequisites

  • Python 3.8.6 or higher
  • FastAPI
  • Docker

Project setup

# clone the repo
$ git clone https://github.com/yezz123/DogeAPI

# move to the project folder
$ cd DogeAPI

Creating virtual environment

  • Create a virtual environment using virtualenv.
# creating virtual environment
$ virtualenv venv

# activate virtual environment
$ source venv/bin/activate

# install all dependencies
$ pip install -r requirements.txt

Running the Application

  • To run the Main we need to use uvicorn a lightning-fast ASGI server implementation, using uvloop and httptools.
# Running the application using uvicorn
$ uvicorn main:app --reload

Environment variables

  • SECRET_KEY: A secret key for signing Json Web Token.
  • SQLALCHEMY_DATABASE_URL: The database url to connect to the database.
  • ACCESS_TOKEN_EXPIRE_MINUTES: The access token expire minutes.

change all the environment variables in the .env.sample and don't forget to rename it to .env.

Configured Enviromment

Models

  • Here for the Models.py, i create 2 tables based on the requirements for this project blogs and users

Running the Docker Container

  • We have the Dockerfile created in above section. Now, we will use the Dockerfile to create the image of the FastAPI app and then start the FastAPI app container.
  • Using a preconfigured Makefile tor run the Docker Compose:
# Pull the latest image
$ make pull

# Build the image
$ make build

# Run the container
$ make start

Preconfigured Packages

Includes preconfigured packages to kick start DogeAPI by just setting appropriate configuration.

Package Usage
uvicorn a lightning-fast ASGI server implementation, using uvloop and httptools.
Python-Jose a JavaScript Object Signing and Encryption implementation in Python.
SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL.
starlette a lightweight ASGI framework/toolkit, which is ideal for building high performance asyncio services.
passlib a password hashing library for Python 2 & 3, which provides cross-platform implementations of over 30 password hashing algorithms
bcrypt Good password hashing for your software and your servers.
python-multipart streaming multipart parser for Python.

yapf packages for linting and formatting

Contributing

  • Join the DOGEAPI Creator and Contribute to the Project if you have any enhancement or add-ons to create a good and Secure Project, Help any User to Use it in a good and simple way.
  • Check all information here at docs's Folder to understand to how to contribute or to Read the Code of Conduct.

License

This project is licensed under the terms of the MIT license.

Comments
  • chore: Add Functions's DocString ✨ (Sourcery refactored)

    chore: Add Functions's DocString ✨ (Sourcery refactored)

    Pull Request #16 refactored by Sourcery.

    If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

    NOTE: As code is pushed to the original Pull Request, Sourcery will re-run and update (force-push) this Pull Request with new refactorings as necessary. If Sourcery finds no refactorings at any point, this Pull Request will be closed automatically.

    See our documentation here.

    Run Sourcery locally

    Reduce the feedback loop during development by using the Sourcery editor plugin:

    Review changes via command line

    To manually merge these changes, make sure you're on the docstring branch, then run:

    git fetch origin sourcery/docstring
    git merge --ff-only FETCH_HEAD
    git reset HEAD^
    

    Help us improve this pull request!

    Extra Small 
    opened by sourcery-ai[bot] 2
  • Update dogeAPI (Sourcery refactored)

    Update dogeAPI (Sourcery refactored)

    Pull Request #14 refactored by Sourcery.

    If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

    NOTE: As code is pushed to the original Pull Request, Sourcery will re-run and update (force-push) this Pull Request with new refactorings as necessary. If Sourcery finds no refactorings at any point, this Pull Request will be closed automatically.

    See our documentation here.

    Run Sourcery locally

    Reduce the feedback loop during development by using the Sourcery editor plugin:

    Review changes via command line

    To manually merge these changes, make sure you're on the Update-DogeAPI branch, then run:

    git fetch origin sourcery/Update-DogeAPI
    git merge --ff-only FETCH_HEAD
    git reset HEAD^
    

    Help us improve this pull request!

    Extra Small 
    opened by sourcery-ai[bot] 2
  • ⬆️ Bump starlette from 0.14.2 to 0.16.0

    ⬆️ Bump starlette from 0.14.2 to 0.16.0

    Bumps starlette from 0.14.2 to 0.16.0.

    Release notes

    Sourced from starlette's releases.

    Version 0.16.0

    Added

    Fixed

    • starlette.websockets.WebSocket instances are now hashable and compare by identity #1039
    • A number of fixes related to running task groups in lifespan #1213, #1227

    Deprecated/removed

    • The method starlette.templates.Jinja2Templates.get_env was removed #1218
    • The ClassVar starlette.testclient.TestClient.async_backend was removed, the backend is now configured using constructor kwargs #1211
    • Passing an Async Generator Function or a Generator Function to starlette.router.Router(lifespan_context=) is deprecated. You should wrap your lifespan in @contextlib.asynccontextmanager. #1227 #1110

    Version 0.15.0

    0.15.0

    This release includes major changes to the low-level asynchronous parts of Starlette. As a result, Starlette now depends on AnyIO and some minor API changes have occurred. Another significant change with this release is the deprecation of built-in GraphQL support.

    Added

    • Starlette now supports Trio as an async runtime via AnyIO - #1157.
    • TestClient.websocket_connect() now must be used as a context manager.
    • Initial support for Python 3.10 - #1201.
    • The compression level used in GZipMiddleware is now adjustable - #1128.

    Fixed

    • Several fixes to CORSMiddleware. See #1111, #1112, #1113, #1199.
    • Improved exception messages in the case of duplicated path parameter names - #1177.
    • RedirectResponse now uses quote instead of quote_plus encoding for the Location header to better match the behaviour in other frameworks such as Django - #1164.
    • Exception causes are now preserved in more cases - #1158.
    • Session cookies now use the ASGI root path in the case of mounted applications - #1147.
    • Fixed a cache invalidation bug when static files were deleted in certain circumstances - #1023.
    • Improved memory usage of BaseHTTPMiddleware when handling large responses - #1012 fixed via #1157

    Deprecated/removed

    • Built-in GraphQL support via the GraphQLApp class has been deprecated and will be removed in a future release. Please see #619. GraphQL is not supported on Python 3.10.
    • The executor parameter to GraphQLApp was removed. Use executor_class instead.
    • The workers parameter to WSGIMiddleware was removed. This hasn't had any effect since Starlette v0.6.3.
    Changelog

    Sourced from starlette's changelog.

    0.16.0

    July 19, 2021

    Added

    Fixed

    • starlette.websockets.WebSocket instances are now hashable and compare by identity #1039
    • A number of fixes related to running task groups in lifespan #1213, #1227

    Deprecated/removed

    • The method starlette.templates.Jinja2Templates.get_env was removed #1218
    • The ClassVar starlette.testclient.TestClient.async_backend was removed, the backend is now configured using constructor kwargs #1211
    • Passing an Async Generator Function or a Generator Function to starlette.router.Router(lifespan_context=) is deprecated. You should wrap your lifespan in @contextlib.asynccontextmanager. #1227 #1110

    0.15.0

    June 23, 2021

    This release includes major changes to the low-level asynchronous parts of Starlette. As a result, Starlette now depends on AnyIO and some minor API changes have occurred. Another significant change with this release is the deprecation of built-in GraphQL support.

    Added

    • Starlette now supports Trio as an async runtime via AnyIO - #1157.
    • TestClient.websocket_connect() now must be used as a context manager.
    • Initial support for Python 3.10 - #1201.
    • The compression level used in GZipMiddleware is now adjustable - #1128.

    Fixed

    • Several fixes to CORSMiddleware. See #1111, #1112, #1113, #1199.
    • Improved exception messages in the case of duplicated path parameter names - #1177.
    • RedirectResponse now uses quote instead of quote_plus encoding for the Location header

    ... (truncated)

    Commits
    • e45c579 prepare release 0.16.0 (#1233)
    • b0a6d6f ignore charset_normalizer related warning (#1242)
    • 8a3e41a Document the lifespan event handler parameter (#1110)
    • 537ab6a use an async context manager factory for lifespan (#1227)
    • 254d0d9 ensure TestClient requests run in the same EventLoop as lifespan (#1213)
    • d222b87 TestClient accepts backend and backend_options as arguments to constructor (#...
    • 906e907 reset the __eq__ and __hash__ of HTTPConnection to allow WebSockets to be...
    • 0ef4418 :wrench: Add funding option (#1219)
    • 070d749 Make Jinja2Templates.get_env private & rename (#1218)
    • 6626636 mkdocs: Set site_url (#1215)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies No Changes 
    opened by dependabot[bot] 2
  • Any one can update and delete any one post.And also all blog store in database beside user id -1

    Any one can update and delete any one post.And also all blog store in database beside user id -1

    Here is the issue

    See im logged in as different id,but i can upload other's post which belongs to others

    1

    3

    5

    4

    And every blog stored beside user id 1

    Here is your database screen shot 2

    invalid 
    opened by siumhossain 2
  • ⬆️ Bump typing-extensions from 3.10.0.1 to 3.10.0.2

    ⬆️ Bump typing-extensions from 3.10.0.1 to 3.10.0.2

    Bumps typing-extensions from 3.10.0.1 to 3.10.0.2.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies No Changes 
    opened by dependabot[bot] 1
  • ⬆️ Bump typing-extensions from 3.10.0.0 to 3.10.0.1

    ⬆️ Bump typing-extensions from 3.10.0.0 to 3.10.0.1

    Bumps typing-extensions from 3.10.0.0 to 3.10.0.1.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies No Changes 
    opened by dependabot[bot] 1
  • ⬆️ Bump fastapi from 0.68.0 to 0.68.1

    ⬆️ Bump fastapi from 0.68.0 to 0.68.1

    Bumps fastapi from 0.68.0 to 0.68.1.

    Release notes

    Sourced from fastapi's releases.

    0.68.1

    Translations

    • 🌐 Add Portuguese translation of docs/fastapi-people.md. PR #3461 by @​ComicShrimp.
    • 🌐 Add Chinese translation for docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md. PR #3492 by @​jaystone776.
    • 🔧 Add new Translation tracking issues for German and Indonesian. PR #3718 by @​tiangolo.
    • 🌐 Add Chinese translation for docs/tutorial/dependencies/sub-dependencies.md. PR #3491 by @​jaystone776.
    • 🌐 Add Portuguese translation for docs/advanced/index.md. PR #3460 by @​ComicShrimp.
    • 🌐 Portuguese translation of docs/async.md. PR #1330 by @​Serrones.
    • 🌐 Add French translation for docs/async.md. PR #3416 by @​Smlep.

    Internal

    Commits
    • 7b6e198 🔖 Release version 0.68.1
    • 6ac35b1 📝 Update release notes
    • dc9c570 📝 Update release notes
    • 20d4834 ✨ Add support for read_with_orm_mode, to support SQLModel relationship attr...
    • f7d7c6c 📝 Update release notes
    • c03b9b2 🌐 Add Portuguese translation of docs/fastapi-people.md (#3461)
    • 70f1b8e 📝 Update release notes
    • 13bf477 🌐 Add Chinese translation for `docs/tutorial/dependencies/dependencies-in-pat...
    • ab5afd0 📝 Update release notes
    • b5dcd98 🔧 Add new Translation tracking issues for German and Indonesian (#3718)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies No Changes 
    opened by dependabot[bot] 1
  • ⬆️ Bump sqlalchemy from 1.4.22 to 1.4.23

    ⬆️ Bump sqlalchemy from 1.4.22 to 1.4.23

    Bumps sqlalchemy from 1.4.22 to 1.4.23.

    Release notes

    Sourced from sqlalchemy's releases.

    1.4.23

    Released: August 18, 2021

    general

    • [general] [bug] The setup requirements have been modified such greenlet is a default requirement only for those platforms that are well known for greenlet to be installable and for which there is already a pre-built binary on pypi; the current list is x86_64 aarch64 ppc64le amd64 win32. For other platforms, greenlet will not install by default, which should enable installation and test suite running of SQLAlchemy 1.4 on platforms that don't support greenlet, excluding any asyncio features. In order to install with the greenlet dependency included on a machine architecture outside of the above list, the [asyncio] extra may be included by running pip install sqlalchemy[asyncio] which will then attempt to install greenlet.

      Additionally, the test suite has been repaired so that tests can complete fully when greenlet is not installed, with appropriate skips for asyncio-related tests.

      References: #6136

    orm

    • [orm] [usecase] Added new attribute _sql.Select.columns_clause_froms that will retrieve the FROM list implied by the columns clause of the _sql.Select statement. This differs from the old _sql.Select.froms collection in that it does not perform any ORM compilation steps, which necessarily deannotate the FROM elements and do things like compute joinedloads etc., which makes it not an appropriate candidate for the _sql.Select.select_from() method. Additionally adds a new parameter _sql.Select.with_only_columns.maintain_column_froms that transfers this collection to _sql.Select.select_from() before replacing the columns collection.

      In addition, the _sql.Select.froms is renamed to _sql.Select.get_final_froms(), to stress that this collection is not a simple accessor and is instead calculated given the full state of the object, which can be an expensive call when used in an ORM context.

      Additionally fixes a regression involving the _orm.with_only_columns() function to support applying criteria to column elements that were replaced with either _sql.Select.with_only_columns() or _orm.Query.with_entities() , which had broken as part of #6503 released in 1.4.19.

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies No Changes 
    opened by dependabot[bot] 1
  • ⬆️ Bump uvicorn from 0.14.0 to 0.15.0

    ⬆️ Bump uvicorn from 0.14.0 to 0.15.0

    Bumps uvicorn from 0.14.0 to 0.15.0.

    Release notes

    Sourced from uvicorn's releases.

    Version 0.15.0

    0.15.0 - 2021-08-13

    Added

    • Change reload to be configurable with glob patterns. Currently only .py files are watched, which is different from the previous default behavior. (#820) 08/08/21
    • Add Python 3.10-rc.1 support. Now the server uses asyncio.run which will: start a fresh asyncio event loop, on shutdown cancel any background tasks rather than aborting them, aexit any remaining async generators, and shutdown the default ThreadPoolExecutor. (#1070) 30/07/21
    • Exit with status 3 when worker starts failed (#1077) 22/06/21
    • Add option to set websocket ping interval and timeout (#1048) 09/06/21
    • Adapt bind_socket to make it usable with multiple processes (#1009) 21/06/21
    • Add existence check to the reload directory(ies) (#1089) 21/06/21
    • Add missing trace log for websocket protocols (#1083) 19/06/21
    • Support disabling default Server and Date headers (#818) 11/06/21

    Changed

    • Add PEP440 compliant version of click (#1099) 29/06/21
    • Bump asgiref to 3.4.0 (#1100) 29/06/21

    Fixed

    • When receiving a SIGTERM supervisors now terminate their processes before joining them (#1069) 30/07/21
    • Fix the need of httptools on minimal installation (#1135) 30/07/21
    • Fix ping parameters annotation in Config class (#1127) 19/07/21
    Changelog

    Sourced from uvicorn's changelog.

    0.15.0 - 2021-08-13

    Added

    • Change reload to be configurable with glob patterns. Currently only .py files are watched, which is different from the previous default behavior. (#820) 08/08/21
    • Add Python 3.10-rc.1 support. Now the server uses asyncio.run which will: start a fresh asyncio event loop, on shutdown cancel any background tasks rather than aborting them, aexit any remaining async generators, and shutdown the default ThreadPoolExecutor. (#1070) 30/07/21
    • Exit with status 3 when worker starts failed (#1077) 22/06/21
    • Add option to set websocket ping interval and timeout (#1048) 09/06/21
    • Adapt bind_socket to make it usable with multiple processes (#1009) 21/06/21
    • Add existence check to the reload directory(ies) (#1089) 21/06/21
    • Add missing trace log for websocket protocols (#1083) 19/06/21
    • Support disabling default Server and Date headers (#818) 11/06/21

    Changed

    • Add PEP440 compliant version of click (#1099) 29/06/21
    • Bump asgiref to 3.4.0 (#1100) 29/06/21

    Fixed

    • When receiving a SIGTERM supervisors now terminate their processes before joining them (#1069) 30/07/21
    • Fix the need of httptools on minimal installation (#1135) 30/07/21
    • Fix ping parameters annotation in Config class (#1127) 19/07/21
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies No Changes 
    opened by dependabot[bot] 1
  • ⬆️ Bump sqlalchemy from 1.4.21 to 1.4.22

    ⬆️ Bump sqlalchemy from 1.4.21 to 1.4.22

    Bumps sqlalchemy from 1.4.21 to 1.4.22.

    Release notes

    Sourced from sqlalchemy's releases.

    1.4.22

    Released: July 21, 2021

    orm

    • [orm] [bug] Fixed issue in new _schema.Table.table_valued() method where the resulting _sql.TableValuedColumn construct would not respond correctly to alias adaptation as is used throughout the ORM, such as for eager loading, polymorphic loading, etc.

      References: #6775

    • [orm] [bug] Fixed issue where usage of the _result.Result.unique() method with an ORM result that included column expressions with unhashable types, such as JSON or ARRAY using non-tuples would silently fall back to using the id() function, rather than raising an error. This now raises an error when the _result.Result.unique() method is used in a 2.0 style ORM query. Additionally, hashability is assumed to be True for result values of unknown type, such as often happens when using SQL functions of unknown return type; if values are truly not hashable then the hash() itself will raise.

      For legacy ORM queries, since the legacy _orm.Query object uniquifies in all cases, the old rules remain in place, which is to use id() for result values of unknown type as this legacy uniquing is mostly for the purpose of uniquing ORM entities and not column values.

      References: #6769

    • [orm] [bug] Fixed an issue where clearing of mappers during things like test suite teardowns could cause a "dictionary changed size" warning during garbage collection, due to iteration of a weak-referencing dictionary. A list() has been applied to prevent concurrent GC from affecting this operation.

      References: #6771

    • [orm] [bug] [regression] Fixed critical caching issue where the ORM's persistence feature using INSERT..RETURNING would cache an incorrect query when mixing the "bulk save" and standard "flush" forms of INSERT.

      References: #6793

    engine

    • [engine] [bug] Added some guards against KeyError in the event system to accommodate the case that the interpreter is shutting down at the same time _engine.Engine.dispose() is being called, which would cause stack

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies No Changes 
    opened by dependabot[bot] 1
  • ⬆️ Bump starlette from 0.14.2 to 0.16.0

    ⬆️ Bump starlette from 0.14.2 to 0.16.0

    Bumps starlette from 0.14.2 to 0.16.0.

    Release notes

    Sourced from starlette's releases.

    Version 0.16.0

    Added

    Fixed

    • starlette.websockets.WebSocket instances are now hashable and compare by identity #1039
    • A number of fixes related to running task groups in lifespan #1213, #1227

    Deprecated/removed

    • The method starlette.templates.Jinja2Templates.get_env was removed #1218
    • The ClassVar starlette.testclient.TestClient.async_backend was removed, the backend is now configured using constructor kwargs #1211
    • Passing an Async Generator Function or a Generator Function to starlette.router.Router(lifespan_context=) is deprecated. You should wrap your lifespan in @contextlib.asynccontextmanager. #1227 #1110

    Version 0.15.0

    0.15.0

    This release includes major changes to the low-level asynchronous parts of Starlette. As a result, Starlette now depends on AnyIO and some minor API changes have occurred. Another significant change with this release is the deprecation of built-in GraphQL support.

    Added

    • Starlette now supports Trio as an async runtime via AnyIO - #1157.
    • TestClient.websocket_connect() now must be used as a context manager.
    • Initial support for Python 3.10 - #1201.
    • The compression level used in GZipMiddleware is now adjustable - #1128.

    Fixed

    • Several fixes to CORSMiddleware. See #1111, #1112, #1113, #1199.
    • Improved exception messages in the case of duplicated path parameter names - #1177.
    • RedirectResponse now uses quote instead of quote_plus encoding for the Location header to better match the behaviour in other frameworks such as Django - #1164.
    • Exception causes are now preserved in more cases - #1158.
    • Session cookies now use the ASGI root path in the case of mounted applications - #1147.
    • Fixed a cache invalidation bug when static files were deleted in certain circumstances - #1023.
    • Improved memory usage of BaseHTTPMiddleware when handling large responses - #1012 fixed via #1157

    Deprecated/removed

    • Built-in GraphQL support via the GraphQLApp class has been deprecated and will be removed in a future release. Please see #619. GraphQL is not supported on Python 3.10.
    • The executor parameter to GraphQLApp was removed. Use executor_class instead.
    • The workers parameter to WSGIMiddleware was removed. This hasn't had any effect since Starlette v0.6.3.
    Changelog

    Sourced from starlette's changelog.

    0.16.0

    July 19, 2021

    Added

    Fixed

    • starlette.websockets.WebSocket instances are now hashable and compare by identity #1039
    • A number of fixes related to running task groups in lifespan #1213, #1227

    Deprecated/removed

    • The method starlette.templates.Jinja2Templates.get_env was removed #1218
    • The ClassVar starlette.testclient.TestClient.async_backend was removed, the backend is now configured using constructor kwargs #1211
    • Passing an Async Generator Function or a Generator Function to starlette.router.Router(lifespan_context=) is deprecated. You should wrap your lifespan in @contextlib.asynccontextmanager. #1227 #1110

    0.15.0

    June 23, 2021

    This release includes major changes to the low-level asynchronous parts of Starlette. As a result, Starlette now depends on AnyIO and some minor API changes have occurred. Another significant change with this release is the deprecation of built-in GraphQL support.

    Added

    • Starlette now supports Trio as an async runtime via AnyIO - #1157.
    • TestClient.websocket_connect() now must be used as a context manager.
    • Initial support for Python 3.10 - #1201.
    • The compression level used in GZipMiddleware is now adjustable - #1128.

    Fixed

    • Several fixes to CORSMiddleware. See #1111, #1112, #1113, #1199.
    • Improved exception messages in the case of duplicated path parameter names - #1177.
    • RedirectResponse now uses quote instead of quote_plus encoding for the Location header

    ... (truncated)

    Commits
    • e45c579 prepare release 0.16.0 (#1233)
    • b0a6d6f ignore charset_normalizer related warning (#1242)
    • 8a3e41a Document the lifespan event handler parameter (#1110)
    • 537ab6a use an async context manager factory for lifespan (#1227)
    • 254d0d9 ensure TestClient requests run in the same EventLoop as lifespan (#1213)
    • d222b87 TestClient accepts backend and backend_options as arguments to constructor (#...
    • 906e907 reset the __eq__ and __hash__ of HTTPConnection to allow WebSockets to be...
    • 0ef4418 :wrench: Add funding option (#1219)
    • 070d749 Make Jinja2Templates.get_env private & rename (#1218)
    • 6626636 mkdocs: Set site_url (#1215)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies No Changes 
    opened by dependabot[bot] 1
Owner
Yasser Tahiri
API Developer / Backend Developer who speaks @python. Creator of @BnademOverflow. I love Open Source & Ancient Greece.
Yasser Tahiri
python-social-auth and oauth2 support for django-rest-framework

Django REST Framework Social OAuth2 This module provides OAuth2 social authentication support for applications in Django REST Framework. The aim of th

null 1k Dec 22, 2022
python-social-auth and oauth2 support for django-rest-framework

Django REST Framework Social OAuth2 This module provides OAuth2 social authentication support for applications in Django REST Framework. The aim of th

null 1k Dec 22, 2022
A full Rest-API With Oauth2 and JWT for request & response a JSON file Using FastAPI and SQLAlchemy 🔑

Pexon-Rest-API A full Rest-API for request & response a JSON file, Building a Simple WorkFlow that help you to Request a JSON File Format and Handling

Yasser Tahiri 15 Jul 22, 2022
OAuth2 goodies for the Djangonauts!

Django OAuth Toolkit OAuth2 goodies for the Djangonauts! If you are facing one or more of the following: Your Django app exposes a web API you want to

Jazzband 2.7k Jan 1, 2023
OAuth2 goodies for the Djangonauts!

Django OAuth Toolkit OAuth2 goodies for the Djangonauts! If you are facing one or more of the following: Your Django app exposes a web API you want to

Jazzband 2.7k Dec 31, 2022
Provide OAuth2 access to your app

django-oauth2-provider django-oauth2-provider is a Django application that provides customizable OAuth2-authentication for your Django projects. Docum

Caffeinehit 334 Jul 27, 2022
A Python inplementation for OAuth2

OAuth2-Python Discord Inplementation for OAuth2 login systems. This is a simple Python 'app' made to inplement in your programs that require (shitty)

Prifixy 0 Jan 6, 2022
A wagtail plugin to replace the login by an OAuth2.0 Authorization Server

Wagtail OAuth2.0 Login Plugin to replace Wagtail default login by an OAuth2.0 Authorization Server. What is wagtail-oauth2 OAuth2.0 is an authorizatio

Gandi 7 Oct 7, 2022
Django Auth Protection This package logout users from the system by changing the password in Simple JWT REST API.

Django Auth Protection Django Auth Protection This package logout users from the system by changing the password in REST API. Why Django Auth Protecti

Iman Karimi 5 Oct 26, 2022
Foundation Auth Proxy is an abstraction on Foundations' authentication layer and is used to authenticate requests to Atlas's REST API.

foundations-auth-proxy Setup By default the server runs on http://0.0.0.0:5558. This can be changed via the arguments. Arguments: '-H' or '--host': ho

Dessa - Open Source 2 Jul 3, 2020
Social auth made simple

Python Social Auth Python Social Auth is an easy-to-setup social authentication/registration mechanism with support for several frameworks and auth pr

Matías Aguirre 2.8k Dec 24, 2022
Social auth made simple

Python Social Auth Python Social Auth is an easy-to-setup social authentication/registration mechanism with support for several frameworks and auth pr

Matías Aguirre 2.8k Dec 24, 2022
Auth-Starters - Different APIs using Django & Flask & FastAPI to see Authentication Service how its work

Auth-Starters Different APIs using Django & Flask & FastAPI to see Authentication Service how its work, and how to use it. This Repository based on my

Yasser Tahiri 7 Apr 22, 2022
FastAPI extension that provides JWT Auth support (secure, easy to use, and lightweight)

FastAPI JWT Auth Documentation: https://indominusbyte.github.io/fastapi-jwt-auth Source Code: https://github.com/IndominusByte/fastapi-jwt-auth Featur

Nyoman Pradipta Dewantara 468 Jan 1, 2023
Google Auth Python Library

Google Auth Python Library This library simplifies using Google's various server-to-server authentication mechanisms to access Google APIs. Installing

Google APIs 598 Jan 7, 2023
Authentication Module for django rest auth

django-rest-knox Authentication Module for django rest auth Knox provides easy to use authentication for Django REST Framework The aim is to allow for

James McMahon 878 Jan 4, 2023
Auth for use with FastAPI

FastAPI Auth Pluggable auth for use with FastAPI Supports OAuth2 Password Flow Uses JWT access and refresh tokens 100% mypy and test coverage Supports

David Montague 95 Jan 2, 2023
OpenStack Keystone auth plugin for HTTPie

httpie-keystone-auth OpenStack Keystone auth plugin for HTTPie. Installation $ pip install --upgrade httpie-keystone-auth You should now see keystone

Pavlo Shchelokovskyy 1 Oct 20, 2021
OpenConnect auth creditials collector.

OCSERV AUTH CREDS COLLECTOR V1.0 Зачем Изначально было написано чтобы мониторить какие данные вводятся в интерфейс ханипота в виде OpenConnect server.

null 0 Sep 23, 2022