Neo4j Movies Example application with Flask backend using the neo4j-python-driver

Overview

Neo4j Movies Application: Quick Start

CI
movie application

This example application demonstrates how easy it is to get started with Neo4j in Python.

It is a very simple web application that uses our Movie graph dataset to provide a search with listing, a detail view and a graph visualization.

The Stack

These are the components of our Web Application:

  • Application Type: Python-Web Application

  • Web framework: Flask (Micro-Webframework)

  • Neo4j Database Connector: Neo4j Python Driver for Cypher Docs

  • Database: Neo4j-Server (4.x) with multi-database

  • Frontend: jquery, bootstrap, d3.js

Provision a database quickly with Neo4j Sandbox or Neo4j Aura.

Setup

First get yourself setup with virtualenv so we don’t break any other Python stuff you have on your machine. After you’ve got that installed let’s setup an environment for our app:

virtualenv neo4j-movies
source neo4j-movies/bin/activate

The next step is to install the dependencies for the app with pip (or pip3 for python3):

pip install -r requirements.txt

Run locally

Start your local Neo4j Server (Download & Install), open the Neo4j Browser. Then install the Movies data-set with :play movies, click the statement, and hit the triangular "Run" button.

And finally let’s start up a Flask web server:

python movies.py
# or python3 movies.py


Running on http://127.0.0.1:8080/

Navigate to http://localhost:8080 and you should see your first Neo4j application

Configuration options

Environment variable name Default value (or N/A)

PORT

8080

NEO4J_URI

neo4j+s://demo.neo4jlabs.com

NEO4J_USER

movies

NEO4J_PASSWORD

movies

NEO4J_DATABASE

movies

Comments
  • ISSUE: The client is unauthorised due to authentication failure

    ISSUE: The client is unauthorised due to authentication failure

    Hi, I am trying to implement the sample movies python application and while doing so I am facing authentication failure error. I am following the steps mentioned in the website - https://github.com/neo4j-examples/movies-python-bolt. when I am running "python movies.py" command the following error is showing up - Traceback (most recent call last): File "movies.py", line 12, in <module> driver = GraphDatabase.driver('bolt://localhost',auth=basic_auth("neo4j", "p assword")) File "C:\Users\611593250\AppData\Local\Programs\Python\Python36-32\lib\site-pa ckages\neo4j\v1\api.py", line 124, in driver return driver_class(uri, **config) File "C:\Users\611593250\AppData\Local\Programs\Python\Python36-32\lib\site-pa ckages\neo4j\v1\direct.py", line 65, in __init__ pool.release(pool.acquire()) File "C:\Users\611593250\AppData\Local\Programs\Python\Python36-32\lib\site-pa ckages\neo4j\v1\direct.py", line 39, in acquire connection = self.acquire_direct(address) # should always be a resolved add ress File "C:\Users\611593250\AppData\Local\Programs\Python\Python36-32\lib\site-pa ckages\neo4j\bolt\connection.py", line 398, in acquire_direct connection = self.connector(address) File "C:\Users\611593250\AppData\Local\Programs\Python\Python36-32\lib\site-pa ckages\neo4j\v1\direct.py", line 64, in <lambda> pool = DirectConnectionPool(lambda a: connect(a, security_plan.ssl_context, **config), self.address) File "C:\Users\611593250\AppData\Local\Programs\Python\Python36-32\lib\site-pa ckages\neo4j\bolt\connection.py", line 555, in connect return Connection(s, der_encoded_server_certificate=der_encoded_server_certi ficate, **config) File "C:\Users\611593250\AppData\Local\Programs\Python\Python36-32\lib\site-pa ckages\neo4j\bolt\connection.py", line 184, in __init__ self.sync() File "C:\Users\611593250\AppData\Local\Programs\Python\Python36-32\lib\site-pa ckages\neo4j\bolt\connection.py", line 337, in sync detail_delta, summary_delta = self.fetch() File "C:\Users\611593250\AppData\Local\Programs\Python\Python36-32\lib\site-pa ckages\neo4j\bolt\connection.py", line 287, in fetch response.on_failure(summary_metadata or {}) File "C:\Users\611593250\AppData\Local\Programs\Python\Python36-32\lib\site-pa ckages\neo4j\bolt\response.py", line 61, in on_failure raise AuthError(message) neo4j.exceptions.AuthError: The client is unauthorized due to authentication fai lure.

    opened by KaustavRoy4 4
  • Database access is not allowed for user 'movies' with roles [PUBLIC, movies]

    Database access is not allowed for user 'movies' with roles [PUBLIC, movies]

    This web application doesn't work either using the database on demo.neo4jlabs.com or the local database. When using the database on demo.neo4jlabs.com, following exception is raised:

    Traceback (most recent call last):                                                                                                                                                                                                                                               File "C:\Program Files\Python37\lib\site-packages\flask\app.py", line 2070, in wsgi_app
    response = self.full_dispatch_request()                                                                                                                                                                                                                                      File "C:\Program Files\Python37\lib\site-packages\flask\app.py", line 1515, in full_dispatch_request
    rv = self.handle_user_exception(e)
    File "C:\Program Files\Python37\lib\site-packages\flask\app.py", line 1513, in full_dispatch_request
    rv = self.dispatch_request()                                                                                                                                                                                                                                                 File "C:\Program Files\Python37\lib\site-packages\flask\app.py", line 1499, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
    File "movies.py", line 65, in get_graph
    results = db.read_transaction(lambda tx: list(tx.run("MATCH (m:Movie)<-[:ACTED_IN]-(a:Person) "
    File "C:\Program Files\Python37\lib\site-packages\neo4j\work\simple.py", line 409, in read_transaction
    return self._run_transaction(READ_ACCESS, transaction_function, *args, **kwargs)
    File "C:\Program Files\Python37\lib\site-packages\neo4j\work\simple.py", line 338, in _run_transaction 
    result = transaction_function(tx, *args, **kwargs)
    File "movies.py", line 69, in <lambda>
    100)}))) 
    File "C:\Program Files\Python37\lib\site-packages\neo4j\work\transaction.py", line 130, in run
    result._tx_ready_run(query, parameters, **kwparameters)
    File "C:\Program Files\Python37\lib\site-packages\neo4j\work\result.py", line 100, in _tx_ready_run
    self._run(query, parameters, None, None, None, **kwparameters)
    File "C:\Program Files\Python37\lib\site-packages\neo4j\work\result.py", line 144, in _run
    self._attach()
    File "C:\Program Files\Python37\lib\site-packages\neo4j\work\result.py", line 245, in _attach
    self._connection.fetch_message()
    File "C:\Program Files\Python37\lib\site-packages\neo4j\work\result.py", line 62, in inner
    func(*args, **kwargs)
    File "C:\Program Files\Python37\lib\site-packages\neo4j\io\_bolt4.py", line 271, in fetch_message
    response.on_failure(summary_metadata or {})
    File "C:\Program Files\Python37\lib\site-packages\neo4j\io\_common.py", line 183, in on_failure
    raise Neo4jError.hydrate(**metadata)
    neo4j.exceptions.Forbidden: {code: Neo.ClientError.Security.Forbidden} {message: Database access is not allowed for user
    'movies' with roles [PUBLIC, movies].}
    

    When using the local database, when doing a search, there is no content displayed on the website.

    opened by ghost 3
  • Bump flask from 0.10.1 to 1.0

    Bump flask from 0.10.1 to 1.0

    Bumps flask from 0.10.1 to 1.0.

    Release notes

    Sourced from flask's releases.

    1.0

    The Pallets team is pleased to release Flask 1.0. [Read the announcement on our blog.](https://www.palletsprojects.com/blog/flask-1-0-released/

    There are over a year's worth of changes in this release. Many features have been improved or changed. Read the changelog to understand how your project's code will be affected.

    JSON Security Fix

    Flask previously decoded incoming JSON bytes using the content type of the request. Although JSON should only be encoded as UTF-8, Flask was more lenient. However, Python includes non-text related encodings that could result in unexpected memory use by a request.

    Flask will now detect the encoding of incoming JSON data as one of the supported UTF encodings, and will not allow arbitrary encodings from the request.

    Install or Upgrade

    Install from PyPI with pip:

    pip install -U Flask
    

    0.12.4

    This is a repackage of 0.12.3 to fix an issue with how the package was built.

    Upgrade

    Upgrade from PyPI with pip. Use a version identifier if you want to stay at 0.12:

    pip install -U 'Flask~=0.12.4'
    

    0.12.3

    This release includes an important security fix for JSON and a minor backport for CLI support in PyCharm. It is provided for projects that cannot update to Flask 1.0 immediately. See the 1.0 announcement and update to it instead if possible.

    JSON Security Fix

    Flask previously decoded incoming JSON bytes using the content type of the request. Although JSON should only be encoded as UTF-8, Flask was more lenient. However, Python includes non-text related encodings that could result in unexpected memory use by a request.

    Flask will now detect the encoding of incoming JSON data as one of the supported UTF encodings, and will not allow arbitrary encodings from the request.

    Upgrade

    Upgrade from PyPI with pip. Use a version identifier if you want to stay at 0.12:

    pip install -U 'Flask~=0.12.3'
    
    ... (truncated)
    Changelog

    Sourced from flask's changelog.

    Version 1.0

    Released 2018-04-26

    • Python 2.6 and 3.3 are no longer supported.
    • Bump minimum dependency versions to the latest stable versions: Werkzeug >= 0.14, Jinja >= 2.10, itsdangerous >= 0.24, Click >= 5.1. :issue:2586
    • Skip :meth:app.run <Flask.run> when a Flask application is run from the command line. This avoids some behavior that was confusing to debug.
    • Change the default for :data:JSONIFY_PRETTYPRINT_REGULAR to False. :func:~json.jsonify returns a compact format by default, and an indented format in debug mode. :pr:2193
    • :meth:Flask.__init__ <Flask> accepts the host_matching argument and sets it on :attr:~Flask.url_map. :issue:1559
    • :meth:Flask.__init__ <Flask> accepts the static_host argument and passes it as the host argument when defining the static route. :issue:1559
    • :func:send_file supports Unicode in attachment_filename. :pr:2223
    • Pass _scheme argument from :func:url_for to :meth:~Flask.handle_url_build_error. :pr:2017
    • :meth:~Flask.add_url_rule accepts the provide_automatic_options argument to disable adding the OPTIONS method. :pr:1489
    • :class:~views.MethodView subclasses inherit method handlers from base classes. :pr:1936
    • Errors caused while opening the session at the beginning of the request are handled by the app's error handlers. :pr:2254
    • Blueprints gained :attr:~Blueprint.json_encoder and :attr:~Blueprint.json_decoder attributes to override the app's encoder and decoder. :pr:1898
    • :meth:Flask.make_response raises TypeError instead of ValueError for bad response types. The error messages have been improved to describe why the type is invalid. :pr:2256
    • Add routes CLI command to output routes registered on the application. :pr:2259
    • Show warning when session cookie domain is a bare hostname or an IP address, as these may not behave properly in some browsers, such as Chrome. :pr:2282
    • Allow IP address as exact session cookie domain. :pr:2282
    • SESSION_COOKIE_DOMAIN is set if it is detected through SERVER_NAME. :pr:2282
    • Auto-detect zero-argument app factory called create_app or make_app from FLASK_APP. :pr:2297
    • Factory functions are not required to take a script_info parameter to work with the flask command. If they take a single parameter or a parameter named script_info, the
    ... (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)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 3
  • Updated deprecated query syntax. Updated neo4j version

    Updated deprecated query syntax. Updated neo4j version

    The current version did not work with Neo4j 4.0.1 due to deprecated query syntax. Updated the queries and using a more recent version of the neo4j library.

    opened by asantod 3
  • OSError thrown upon starting the example

    OSError thrown upon starting the example

    I have exported the NEO4J_PASSWORD environment variable, even tried replacing the password in the driver initialization. Also tried adding a port number in the driver line.

    (neo4j-movies)#> python movies.py Traceback (most recent call last): File "movies.py", line 13, in <module> driver = GraphDatabase.driver('bolt://localhost',auth=basic_auth("neo4j", password)) File "/home/blackplague/development/movies-python-bolt/neo4j-movies/lib/python3.7/site-packages/neo4j/v1/api.py", line 94, in driver return Driver(uri, **config) File "/home/blackplague/development/movies-python-bolt/neo4j-movies/lib/python3.7/site-packages/neo4j/v1/api.py", line 133, in __new__ return subclass(uri, **config) File "/home/blackplague/development/movies-python-bolt/neo4j-movies/lib/python3.7/site-packages/neo4j/v1/direct.py", line 73, in __new__ pool.release(pool.acquire()) File "/home/blackplague/development/movies-python-bolt/neo4j-movies/lib/python3.7/site-packages/neo4j/v1/direct.py", line 44, in acquire return self.acquire_direct(self.address) File "/home/blackplague/development/movies-python-bolt/neo4j-movies/lib/python3.7/site-packages/neo4j/bolt/connection.py", line 453, in acquire_direct connection = self.connector(address, self.connection_error_handler) File "/home/blackplague/development/movies-python-bolt/neo4j-movies/lib/python3.7/site-packages/neo4j/v1/direct.py", line 70, in connector return connect(address, security_plan.ssl_context, error_handler, **config) File "/home/blackplague/development/movies-python-bolt/neo4j-movies/lib/python3.7/site-packages/neo4j/bolt/connection.py", line 707, in connect raise last_error File "/home/blackplague/development/movies-python-bolt/neo4j-movies/lib/python3.7/site-packages/neo4j/bolt/connection.py", line 698, in connect s, der_encoded_server_certificate = _secure(s, address[0], ssl_context, **config) File "/home/blackplague/development/movies-python-bolt/neo4j-movies/lib/python3.7/site-packages/neo4j/bolt/connection.py", line 601, in _secure s = ssl_context.wrap_socket(s, server_hostname=host if HAS_SNI and host else None) File "/home/blackplague/bin/anaconda3/lib/python3.7/ssl.py", line 412, in wrap_socket session=session File "/home/blackplague/bin/anaconda3/lib/python3.7/ssl.py", line 853, in _create self.do_handshake() File "/home/blackplague/bin/anaconda3/lib/python3.7/ssl.py", line 1117, in do_handshake self._sslobj.do_handshake() OSError: [Errno 0] Error

    Any idea how to progress from here?

    opened by blackplague 3
  • Accessing graph database is slow

    Accessing graph database is slow

    Hello I find that creating couple of nodes and updating them takes around 5-6 seconds each time. Is it normal ? Are there any ways to improve the access to the database ?

    opened by aytekincem 3
  • ImportError: cannot import name 'ResultError'

    ImportError: cannot import name 'ResultError'

    has this been deprecated?

    >>> from neo4j.v1 import GraphDatabase, basic_auth, ResultError
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ImportError: cannot import name 'ResultError'
    
    opened by Northshoot 3
  • Bump starlette from 0.17.1 to 0.20.0

    Bump starlette from 0.17.1 to 0.20.0

    Bumps starlette from 0.17.1 to 0.20.0.

    Release notes

    Sourced from starlette's releases.

    Version 0.20.0

    Removed

    Version 0.19.1

    Fixed

    • Fix inference of Route.name when created from methods #1553.
    • Avoid TypeError on websocket.disconnect when code is None #1574.

    Deprecated

    • Deprecate WS_1004_NO_STATUS_RCVD and WS_1005_ABNORMAL_CLOSURE in favor of WS_1005_NO_STATUS_RCVD and WS_1006_ABNORMAL_CLOSURE, as the previous constants didn't match the WebSockets specs #1580.

    Version 0.19.0

    Added

    • Error handler will always run, even if the error happens on a background task #761.
    • Add headers parameter to HTTPException #1435.
    • Internal responses with 405 status code insert an Allow header, as described by RFC 7231 #1436.
    • The content argument in JSONResponse is now required #1431.
    • Add custom URL convertor register #1437.
    • Add content disposition type parameter to FileResponse #1266.
    • Add next query param with original request URL in requires decorator #920.
    • Add raw_path to TestClient scope #1445.
    • Add union operators to MutableHeaders #1240.
    • Display missing route details on debug page #1363.
    • Change anyio required version range to >=3.4.0,<5.0 #1421 and #1460.
    • Add typing-extensions>=3.10 requirement - used only on lower versions than Python 3.10 #1475.

    Fixed

    • Prevent BaseHTTPMiddleware from hiding errors of StreamingResponse and mounted applications #1459.
    • SessionMiddleware uses an explicit path=..., instead of defaulting to the ASGI 'root_path' #1512.
    • Request.client is now compliant with the ASGI specifications #1462.
    • Raise KeyError at early stage for missing boundary #1349.

    Deprecated

    • Deprecate WSGIMiddleware in favor of a2wsgi #1504.
    • Deprecate run_until_first_complete #1443.

    Version 0.18.0

    Added

    • Change default chunk size from 4Kb to 64Kb on FileResponse #1345.
    • Add support for functools.partial in WebSocketRoute #1356.
    • Add StaticFiles packages with directory #1350.
    • Allow environment options in Jinja2Templates #1401.
    • Allow HEAD method on HttpEndpoint #1346.
    • Accept additional headers on websocket.accept message #1361 and #1422.
    • Add reason to WebSocket close ASGI event #1417.
    • Add headers attribute to UploadFile #1382.
    • Don't omit Content-Length header for Content-Length: 0 cases #1395.
    • Don't set headers for responses with 1xx, 204 and 304 status code #1397.
    • SessionMiddleware.max_age now accepts None, so cookie can last as long as the browser session #1387.

    ... (truncated)

    Changelog

    Sourced from starlette's changelog.

    0.20.0

    May 3, 2022

    Removed

    0.19.1

    April 22, 2022

    Fixed

    • Fix inference of Route.name when created from methods #1553.
    • Avoid TypeError on websocket.disconnect when code is None #1574.

    Deprecated

    • Deprecate WS_1004_NO_STATUS_RCVD and WS_1005_ABNORMAL_CLOSURE in favor of WS_1005_NO_STATUS_RCVD and WS_1006_ABNORMAL_CLOSURE, as the previous constants didn't match the WebSockets specs #1580.

    0.19.0

    March 9, 2022

    Added

    • Error handler will always run, even if the error happens on a background task #761.
    • Add headers parameter to HTTPException #1435.
    • Internal responses with 405 status code insert an Allow header, as described by RFC 7231 #1436.
    • The content argument in JSONResponse is now required #1431.
    • Add custom URL convertor register #1437.
    • Add content disposition type parameter to FileResponse #1266.
    • Add next query param with original request URL in requires decorator #920.
    • Add raw_path to TestClient scope #1445.
    • Add union operators to MutableHeaders #1240.
    • Display missing route details on debug page #1363.
    • Change anyio required version range to >=3.4.0,<5.0 #1421 and #1460.
    • Add typing-extensions>=3.10 requirement - used only on lower versions than Python 3.10 #1475.

    Fixed

    • Prevent BaseHTTPMiddleware from hiding errors of StreamingResponse and mounted applications #1459.
    • SessionMiddleware uses an explicit path=..., instead of defaulting to the ASGI 'root_path' #1512.
    • Request.client is now compliant with the ASGI specifications #1462.
    • Raise KeyError at early stage for missing boundary #1349.

    Deprecated

    • Deprecate WSGIMiddleware in favor of a2wsgi #1504.
    • Deprecate run_until_first_complete #1443.

    0.18.0

    ... (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 
    opened by dependabot[bot] 2
  • Bump starlette from 0.17.1 to 0.19.1

    Bump starlette from 0.17.1 to 0.19.1

    Bumps starlette from 0.17.1 to 0.19.1.

    Release notes

    Sourced from starlette's releases.

    Version 0.19.1

    Fixed

    • Fix inference of Route.name when created from methods #1553.
    • Avoid TypeError on websocket.disconnect when code is None #1574.

    Deprecated

    • Deprecate WS_1004_NO_STATUS_RCVD and WS_1005_ABNORMAL_CLOSURE in favor of WS_1005_NO_STATUS_RCVD and WS_1006_ABNORMAL_CLOSURE, as the previous constants didn't match the WebSockets specs #1580.

    Version 0.19.0

    Added

    • Error handler will always run, even if the error happens on a background task #761.
    • Add headers parameter to HTTPException #1435.
    • Internal responses with 405 status code insert an Allow header, as described by RFC 7231 #1436.
    • The content argument in JSONResponse is now required #1431.
    • Add custom URL convertor register #1437.
    • Add content disposition type parameter to FileResponse #1266.
    • Add next query param with original request URL in requires decorator #920.
    • Add raw_path to TestClient scope #1445.
    • Add union operators to MutableHeaders #1240.
    • Display missing route details on debug page #1363.
    • Change anyio required version range to >=3.4.0,<5.0 #1421 and #1460.
    • Add typing-extensions>=3.10 requirement - used only on lower versions than Python 3.10 #1475.

    Fixed

    • Prevent BaseHTTPMiddleware from hiding errors of StreamingResponse and mounted applications #1459.
    • SessionMiddleware uses an explicit path=..., instead of defaulting to the ASGI 'root_path' #1512.
    • Request.client is now compliant with the ASGI specifications #1462.
    • Raise KeyError at early stage for missing boundary #1349.

    Deprecated

    • Deprecate WSGIMiddleware in favor of a2wsgi #1504.
    • Deprecate run_until_first_complete #1443.

    Version 0.18.0

    Added

    • Change default chunk size from 4Kb to 64Kb on FileResponse #1345.
    • Add support for functools.partial in WebSocketRoute #1356.
    • Add StaticFiles packages with directory #1350.
    • Allow environment options in Jinja2Templates #1401.
    • Allow HEAD method on HttpEndpoint #1346.
    • Accept additional headers on websocket.accept message #1361 and #1422.
    • Add reason to WebSocket close ASGI event #1417.
    • Add headers attribute to UploadFile #1382.
    • Don't omit Content-Length header for Content-Length: 0 cases #1395.
    • Don't set headers for responses with 1xx, 204 and 304 status code #1397.
    • SessionMiddleware.max_age now accepts None, so cookie can last as long as the browser session #1387.

    Fixed

    • Tweak hashlib.md5() function on FileResponses ETag generation. The parameter usedforsecurity flag is set to False, if the flag is available on the system. This fixes an error raised on systems with FIPS enabled #1366 and #1410.
    • Fix path_params type on url_path_for() method i.e. turn str into Any #1341.

    ... (truncated)

    Changelog

    Sourced from starlette's changelog.

    0.19.1

    April 22, 2022

    Fixed

    • Fix inference of Route.name when created from methods #1553.
    • Avoid TypeError on websocket.disconnect when code is None #1574.

    Deprecated

    • Deprecate WS_1004_NO_STATUS_RCVD and WS_1005_ABNORMAL_CLOSURE in favor of WS_1005_NO_STATUS_RCVD and WS_1006_ABNORMAL_CLOSURE, as the previous constants didn't match the WebSockets specs #1580.

    0.19.0

    March 9, 2022

    Added

    • Error handler will always run, even if the error happens on a background task #761.
    • Add headers parameter to HTTPException #1435.
    • Internal responses with 405 status code insert an Allow header, as described by RFC 7231 #1436.
    • The content argument in JSONResponse is now required #1431.
    • Add custom URL convertor register #1437.
    • Add content disposition type parameter to FileResponse #1266.
    • Add next query param with original request URL in requires decorator #920.
    • Add raw_path to TestClient scope #1445.
    • Add union operators to MutableHeaders #1240.
    • Display missing route details on debug page #1363.
    • Change anyio required version range to >=3.4.0,<5.0 #1421 and #1460.
    • Add typing-extensions>=3.10 requirement - used only on lower versions than Python 3.10 #1475.

    Fixed

    • Prevent BaseHTTPMiddleware from hiding errors of StreamingResponse and mounted applications #1459.
    • SessionMiddleware uses an explicit path=..., instead of defaulting to the ASGI 'root_path' #1512.
    • Request.client is now compliant with the ASGI specifications #1462.
    • Raise KeyError at early stage for missing boundary #1349.

    Deprecated

    • Deprecate WSGIMiddleware in favor of a2wsgi #1504.
    • Deprecate run_until_first_complete #1443.

    0.18.0

    January 23, 2022

    Added

    • Change default chunk size from 4Kb to 64Kb on FileResponse #1345.
    • Add support for functools.partial in WebSocketRoute #1356.
    • Add StaticFiles packages with directory #1350.
    • Allow environment options in Jinja2Templates #1401.

    ... (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 
    opened by dependabot[bot] 2
  • Bump starlette from 0.17.1 to 0.19.0

    Bump starlette from 0.17.1 to 0.19.0

    Bumps starlette from 0.17.1 to 0.19.0.

    Release notes

    Sourced from starlette's releases.

    Version 0.19.0

    Added

    • Error handler will always run, even if the error happens on a background task #761.
    • Add headers parameter to HTTPException #1435.
    • Internal responses with 405 status code insert an Allow header, as described by RFC 7231 #1436.
    • The content argument in JSONResponse is now required #1431.
    • Add custom URL convertor register #1437.
    • Add content disposition type parameter to FileResponse #1266.
    • Add next query param with original request URL in requires decorator #920.
    • Add raw_path to TestClient scope #1445.
    • Add union operators to MutableHeaders #1240.
    • Display missing route details on debug page #1363.
    • Change anyio required version range to >=3.4.0,<5.0 #1421 and #1460.
    • Add typing-extensions>=3.10 requirement - used only on lower versions than Python 3.10 #1475.

    Fixed

    • Prevent BaseHTTPMiddleware from hiding errors of StreamingResponse and mounted applications #1459.
    • SessionMiddleware uses an explicit path=..., instead of defaulting to the ASGI 'root_path' #1512.
    • Request.client is now compliant with the ASGI specifications #1462.
    • Raise KeyError at early stage for missing boundary #1349.

    Deprecated

    • Deprecate WSGIMiddleware in favor of a2wsgi #1504.
    • Deprecate run_until_first_complete #1443.

    Version 0.18.0

    Added

    • Change default chunk size from 4Kb to 64Kb on FileResponse #1345.
    • Add support for functools.partial in WebSocketRoute #1356.
    • Add StaticFiles packages with directory #1350.
    • Allow environment options in Jinja2Templates #1401.
    • Allow HEAD method on HttpEndpoint #1346.
    • Accept additional headers on websocket.accept message #1361 and #1422.
    • Add reason to WebSocket close ASGI event #1417.
    • Add headers attribute to UploadFile #1382.
    • Don't omit Content-Length header for Content-Length: 0 cases #1395.
    • Don't set headers for responses with 1xx, 204 and 304 status code #1397.
    • SessionMiddleware.max_age now accepts None, so cookie can last as long as the browser session #1387.

    Fixed

    • Tweak hashlib.md5() function on FileResponses ETag generation. The parameter usedforsecurity flag is set to False, if the flag is available on the system. This fixes an error raised on systems with FIPS enabled #1366 and #1410.
    • Fix path_params type on url_path_for() method i.e. turn str into Any #1341.
    • Host now ignores port on routing #1322.
    Changelog

    Sourced from starlette's changelog.

    0.19.0

    March 9, 2022

    Added

    • Error handler will always run, even if the error happens on a background task #761.
    • Add headers parameter to HTTPException #1435.
    • Internal responses with 405 status code insert an Allow header, as described by RFC 7231 #1436.
    • The content argument in JSONResponse is now required #1431.
    • Add custom URL convertor register #1437.
    • Add content disposition type parameter to FileResponse #1266.
    • Add next query param with original request URL in requires decorator #920.
    • Add raw_path to TestClient scope #1445.
    • Add union operators to MutableHeaders #1240.
    • Display missing route details on debug page #1363.
    • Change anyio required version range to >=3.4.0,<5.0 #1421 and #1460.
    • Add typing-extensions>=3.10 requirement - used only on lower versions than Python 3.10 #1475.

    Fixed

    • Prevent BaseHTTPMiddleware from hiding errors of StreamingResponse and mounted applications #1459.
    • SessionMiddleware uses an explicit path=..., instead of defaulting to the ASGI 'root_path' #1512.
    • Request.client is now compliant with the ASGI specifications #1462.
    • Raise KeyError at early stage for missing boundary #1349.

    Deprecated

    • Deprecate WSGIMiddleware in favor of a2wsgi #1504.
    • Deprecate run_until_first_complete #1443.

    0.18.0

    January 23, 2022

    Added

    • Change default chunk size from 4Kb to 64Kb on FileResponse #1345.
    • Add support for functools.partial in WebSocketRoute #1356.
    • Add StaticFiles packages with directory #1350.
    • Allow environment options in Jinja2Templates #1401.
    • Allow HEAD method on HttpEndpoint #1346.
    • Accept additional headers on websocket.accept message #1361 and #1422.
    • Add reason to WebSocket close ASGI event #1417.
    • Add headers attribute to UploadFile #1382.
    • Don't omit Content-Length header for Content-Length: 0 cases #1395.
    • Don't set headers for responses with 1xx, 204 and 304 status code #1397.
    • SessionMiddleware.max_age now accepts None, so cookie can last as long as the browser session #1387.

    Fixed

    • Tweak hashlib.md5() function on FileResponses ETag generation. The parameter usedforsecurity flag is set to False, if the flag is available on the system. This fixes an error raised on systems with FIPS enabled #1366 and #1410.
    • Fix path_params type on url_path_for() method i.e. turn str into Any #1341.
    • Host now ignores port on routing #1322.
    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 
    opened by dependabot[bot] 2
  • Bump starlette from 0.17.1 to 0.18.0

    Bump starlette from 0.17.1 to 0.18.0

    Bumps starlette from 0.17.1 to 0.18.0.

    Release notes

    Sourced from starlette's releases.

    Version 0.18.0

    Added

    • Change default chunk size from 4Kb to 64Kb on FileResponse #1345.
    • Add support for functools.partial in WebSocketRoute #1356.
    • Add StaticFiles packages with directory #1350.
    • Allow environment options in Jinja2Templates #1401.
    • Allow HEAD method on HttpEndpoint #1346.
    • Accept additional headers on websocket.accept message #1361 and #1422.
    • Add reason to WebSocket close ASGI event #1417.
    • Add headers attribute to UploadFile #1382.
    • Don't omit Content-Length header for Content-Length: 0 cases #1395.
    • Don't set headers for responses with 1xx, 204 and 304 status code #1397.
    • SessionMiddleware.max_age now accepts None, so cookie can last as long as the browser session #1387.

    Fixed

    • Tweak hashlib.md5() function on FileResponses ETag generation. The parameter usedforsecurity flag is set to False, if the flag is available on the system. This fixes an error raised on systems with FIPS enabled #1366 and #1410.
    • Fix path_params type on url_path_for() method i.e. turn str into Any #1341.
    • Host now ignores port on routing #1322.
    Changelog

    Sourced from starlette's changelog.

    0.18.0

    January 23, 2022

    Added

    • Change default chunk size from 4Kb to 64Kb on FileResponse #1345.
    • Add support for functools.partial in WebSocketRoute #1356.
    • Add StaticFiles packages with directory #1350.
    • Allow environment options in Jinja2Templates #1401.
    • Allow HEAD method on HttpEndpoint #1346.
    • Accept additional headers on websocket.accept message #1361 and #1422.
    • Add reason to WebSocket close ASGI event #1417.
    • Add headers attribute to UploadFile #1382.
    • Don't omit Content-Length header for Content-Length: 0 cases #1395.
    • Don't set headers for responses with 1xx, 204 and 304 status code #1397.
    • SessionMiddleware.max_age now accepts None, so cookie can last as long as the browser session #1387.

    Fixed

    • Tweak hashlib.md5() function on FileResponses ETag generation. The parameter usedforsecurity flag is set to False, if the flag is available on the system. This fixes an error raised on systems with FIPS enabled #1366 and #1410.
    • Fix path_params type on url_path_for() method i.e. turn str into Any #1341.
    • Host now ignores port on routing #1322.
    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 
    opened by dependabot[bot] 2
  • Bump fastapi from 0.87.0 to 0.88.0

    Bump fastapi from 0.87.0 to 0.88.0

    Bumps fastapi from 0.87.0 to 0.88.0.

    Release notes

    Sourced from fastapi's releases.

    0.88.0

    Upgrades

    • ⬆ Bump Starlette to version 0.22.0 to fix bad encoding for query parameters in new TestClient. PR #5659 by @​azogue.

    Docs

    Translations

    • 🌐 Add Portuguese translation for docs/pt/docs/deployment/docker.md. PR #5663 by @​ayr-ton.

    Internal

    Commits
    • 612b8ff 🔖 Release version 0.88.0
    • 46bb5d2 📝 Update release notes
    • c458ca6 📝 Update release notes
    • 46974c5 ⬆ Bump Starlette to version 0.22.0 to fix bad encoding for query parameters...
    • 89ec1f2 📝 Update release notes
    • 128c925 📝 Update release notes
    • 8842036 👷 Tweak build-docs to improve CI performance (#5699)
    • 9b4e85f ⬆ [pre-commit.ci] pre-commit autoupdate (#5566)
    • 991db7b 📝 Update release notes
    • ebd917a 🌐 Add Portuguese translation for docs/pt/docs/deployment/docker.md (#5663)
    • 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 
    opened by dependabot[bot] 0
  • Bump neo4j from 5.0.0a2 to 5.3.0

    Bump neo4j from 5.0.0a2 to 5.3.0

    Bumps neo4j from 5.0.0a2 to 5.3.0.

    Release notes

    Sourced from neo4j's releases.

    Neo4j Python Driver 5.2.1

    https://github.com/neo4j/neo4j-python-driver/wiki/5.x-changelog#521

    Neo4j Python Driver 5.2.0

    https://github.com/neo4j/neo4j-python-driver/wiki/5.x-changelog#520

    Neo4j Python Driver 5.1.0

    https://github.com/neo4j/neo4j-python-driver/wiki/5.x-changelog#510

    Neo4j Python Driver 5.0.1

    https://github.com/neo4j/neo4j-python-driver/wiki/5.x-changelog#501

    Neo4j Python Driver 5.0.0

    https://github.com/neo4j/neo4j-python-driver/wiki/5.x-changelog#500

    Changelog

    Sourced from neo4j's changelog.

    Neo4j Driver Change Log (breaking/major changes only)

    See also https://github.com/neo4j/neo4j-python-driver/wiki for more details.

    Version 5.3

    • Python 3.11 support added
    • Removed undocumented, unused neo4j.data.map_type
    • Query strings are now typed LiteralString instead of str to help mitigate accidental Cypher injections. There are rare use-cases where a computed string is necessary. Please use # type: ignore, or typing.cast to suppress the type checking in those cases.
    • The experimental bookmark manager feature was changed to no longer track bookmarks per database.
      This effectively changes the signature of almost all bookmark manager related methods:
      • neo4j.BookmarkManger and neo4j.AsyncBookmarkManger abstract base classes:
        • update_bookmarks has no longer a database argument.
        • get_bookmarks has no longer a database argument.
        • The get_all_bookmarks method was removed.
        • The forget method was removed.
      • neo4j.GraphDatabase.bookmark_manager and neo4j.AsyncGraphDatabase.bookmark_manager factory methods:
        • initial_bookmarks is no longer a mapping from database name to bookmarks but plain bookmarks.
        • bookmarks_supplier no longer receives the database name as an argument.
        • bookmarks_consumer no longer receives the database name as an argument.

    Version 5.2

    • No breaking or major changes.

    Version 5.1

    • No breaking or major changes.

    Version 5.0

    • Python 3.10 support added
    • Python 3.6 support has been dropped.
    • Result, Session, and Transaction can no longer be imported from neo4j.work. They should've been imported from neo4j all along.
      Remark: It's recommended to import everything needed directly from noe4j if available, not its submodules or subpackages.
    • Experimental pipelines feature has been removed.

    ... (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 
    opened by dependabot[bot] 0
Owner
Neo4j Examples
Examples for Neo4j and Library Usage
Neo4j Examples
Serve angular production application from python flask backend. Quick and Easy

Serve angular production application from python flask backend. Quick and Easy

mark 1 Dec 1, 2022
flask-reactize is a boostrap to serve any React JS application via a Python back-end, using Flask as web framework.

flask-reactize Purpose Developing a ReactJS application requires to use nodejs as back end server. What if you want to consume external APIs: how are

Julien Chomarat 4 Jan 11, 2022
flask-apispec MIT flask-apispec (🥉24 · ⭐ 520) - Build and document REST APIs with Flask and apispec. MIT

flask-apispec flask-apispec is a lightweight tool for building REST APIs in Flask. flask-apispec uses webargs for request parsing, marshmallow for res

Joshua Carp 617 Dec 30, 2022
Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application.

Flask-Bcrypt Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application. Due to the recent increased prevelance of

Max Countryman 310 Dec 14, 2022
Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application.

Flask-Bcrypt Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application. Due to the recent increased prevelance of

Max Countryman 282 Feb 11, 2021
Flask-Starter is a boilerplate starter template designed to help you quickstart your Flask web application development.

Flask-Starter Flask-Starter is a boilerplate starter template designed to help you quickstart your Flask web application development. It has all the r

Kundan Singh 259 Dec 26, 2022
The Coodesh Python Backend Challenge (2021) written in Flask

Coodesh Back-end Challenge ?? 2021 ID: 917 The Python Back-end Coodesh Challenge Description This API automatically retrieves users from the RandomUse

Marcus Vinicius Pereira 1 Oct 20, 2021
A simple example using Flask inside a container

This is a simple example of how create a container for a Python Flask Web Application using Docker.

Fazt Web 8 Aug 30, 2022
SQL Alchemy dialect for Neo4j

SQL Alchemy dialect for Neo4j This package provides the SQL dialect for Neo4j, using the official JDBC driver (the Neo4j "BI Connector" ) Installation

Beni Ben zikry 8 Jan 2, 2023
An python flask app with webserver example

python-flask-example-keepalive How it works? Basically its just a python flask webserver which can be used to keep any repl/herokuapp or any other ser

KangersHub 2 Sep 28, 2022
Lux Academy & Data Science East Africa Python Boot Camp, Building and Deploying Flask Application Using Docker Demo App.

Flask and Docker Application Demo A Docker image is a read-only, inert template that comes with instructions for deploying containers. In Docker, ever

Harun Mbaabu Mwenda 11 Oct 29, 2022
This is a simple web application using Python Flask and MySQL database.

Simple Web Application This is a simple web application using Python Flask and MySQL database. This is used in the demonstration of development of Ans

Alaaddin Tarhan 1 Nov 16, 2021
A simple web application built using python flask. It can be used to scan SMEVai accounts for broken pages.

smescan A simple web application built using python flask. It can be used to scan SMEVai accounts for broken pages. Development Process Step 0: Clone

Abu Hurayra 1 Jan 30, 2022
A basic CRUD application built in flask using postgres as database

flask-postgres-CRUD A basic CRUD application built in flask using postgres as database Taks list Dockerfile Initial docker-compose - It is working Dat

Pablo Emídio S.S 9 Sep 25, 2022
Flask-Discord-Bot-Dashboard - A simple discord Bot dashboard created in Flask Python

Flask-Discord-Bot-Dashboard A simple discord Bot dashboard created in Flask Pyth

Ethan 8 Dec 22, 2022
Flask Sitemapper is a small Python 3 package that generates XML sitemaps for Flask applications.

Flask Sitemapper Flask Sitemapper is a small Python 3 package that generates XML sitemaps for Flask applications. This allows you to create a nice and

null 6 Jan 6, 2023
Flask-Rebar combines flask, marshmallow, and swagger for robust REST services.

Flask-Rebar Flask-Rebar combines flask, marshmallow, and swagger for robust REST services. Features Request and Response Validation - Flask-Rebar reli

PlanGrid 223 Dec 19, 2022
Brandnew-flask is a CLI tool used to generate a powerful and mordern flask-app that supports the production environment.

Brandnew-flask is still in the initial stage and needs to be updated and improved continuously. Everyone is welcome to maintain and improve this CLI.

brandonye 4 Jul 17, 2022
Flask Project Template A full feature Flask project template.

Flask Project Template A full feature Flask project template. See also Python-Project-Template for a lean, low dependency Python app. HOW TO USE THIS

Bruno Rocha 96 Dec 23, 2022