
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
|Build Status|
Falcon API resources for databases. See the fulldocumentation <http://falcon-api.readthedocs.io>
.
Run:
.. code:: bash
pip install falcon_dbapi
Packages required for specific databases:
SQLAlchemy
, alchemyjsonschema
elasticsearch-dsl
mongoengine
Below is an example app with:
.. code:: python
import falcon
from falcon_dbapi.middlewares.auth_middleware import AuthMiddleware
from falcon_dbapi.middlewares.json_middleware import RequireJSON, JSONTranslator, JsonError
from falcon_dbapi.resources.index import IndexResource
from falcon_dbapi.resources.sqlalchemy import CollectionResource, SingleResource
from sqlalchemy.ext.automap import automap_base
from sqlalchemy import create_engine
from wsgiref import simple_server
engine = create_engine("sqlite:///mydatabase.db")
Base = automap_base()
Base.prepare(engine, reflect=True)
app = application = falcon.API(
middleware=[
AuthMiddleware('/', {'project-id': 'token-value'}),
RequireJSON(),
JSONTranslator(),
]
)
for name, model in Base.classes.items():
app.add_route('/' + name, CollectionResource(model, engine)),
app.add_route('/' + name + '/{id}', SingleResource(model, engine)),
app.add_route('/', IndexResource(['/' + name for name in Base.classes.keys()]))
app.add_error_handler(Exception, JsonError.handle)
simple_server.make_server('localhost', 8888, app).serve_forever()
Test it using httpie:
.. code:: bash
http http://localhost:8888/
.. |Build Status| image:: https://travis-ci.org/Opentopic/falcon-api.svg?branch=master :target: https://travis-ci.org/Opentopic/falcon-api
FAQs
Falcon API resources for databases
We found that falcon-dbapi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.