-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #392 from candango/develop
Merging develop to master
- Loading branch information
Showing
21 changed files
with
380 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# .readthedocs.yaml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Set the version of Python and other tools you might need | ||
build: | ||
os: ubuntu-20.04 | ||
tools: | ||
python: "3.9" | ||
# You can also specify other tool versions: | ||
# nodejs: "16" | ||
# rust: "1.55" | ||
# golang: "1.17" | ||
|
||
# Build documentation in the docs/ directory with Sphinx | ||
sphinx: | ||
configuration: docs/conf.py | ||
|
||
# If using Sphinx, optionally build your docs in additional formats such as PDF | ||
# formats: | ||
|
||
# Optionally declare the Python requirements required to build your docs | ||
python: | ||
install: | ||
- requirements: requirements/docs.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
Services | ||
======== | ||
|
||
The way firenado organizes the logic to be executed in several parts of an | ||
application is defining services. | ||
|
||
Those services can be injected with the decorator | ||
``firenado.service.served_by``. This decorator will add an instance of a | ||
service to a method of any data connected object. Examples of data connected | ||
classes are ``firenado.tornadoweb.TornadoHandler`` and any descendent of | ||
``firenado.service.FirenadoService``. | ||
|
||
Creating a service and decorating a handler: | ||
|
||
.. code-block:: python | ||
from firenado import service, tornadoweb | ||
# Importing a package with some services | ||
import another_service_package | ||
class MyService(service.FirenadoService): | ||
def do_something(self): | ||
# Self consumer will be the handler where this service was | ||
# called from. | ||
self.consumer.write("Something was done") | ||
class MyHandlerBeingServed(tornadoweb.TornadoHandler): | ||
# A good way to keep the reference is keeping the type hint | ||
my_service: MyService | ||
service_from_another_package: another_service_package.AnotherService | ||
@service.served_by(MyService) | ||
# you can also set the attribute/property name to be used | ||
@service.served_by(another_service_package.AnotherService, | ||
attribute_name="service_from_another_package" | ||
) | ||
def get(self): | ||
# The anotation service.served_by added self.my_service | ||
# here. The attribute/property name will be converted from the | ||
# cammel cased class to dashed separated. | ||
self.my_service.do_something() | ||
self.service_from_another_package.do_another_thing() | ||
You can also add services to another services using the decorator: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
What's new in Firenado 0.2.15 | ||
============================= | ||
|
||
Jan 30, 2022 | ||
------------ | ||
|
||
We are pleased to announce the release of Firenado 0.2.15. | ||
|
||
At this release we added a service decorator to help handle sqlalchemy | ||
sessions. | ||
|
||
Here are the highlights: | ||
|
||
Bug Fixes | ||
~~~~~~~~~ | ||
|
||
* Change dashed parameters to underscored ones in setup.cfg. `#385 <https://github.com/candango/firenado/issues/385>`_ | ||
|
||
Features | ||
~~~~~~~~ | ||
|
||
* Create a decorator to handle shared sqlalchemy sessions between mehtods. `#377 <https://github.com/candango/firenado/issues/377>`_ | ||
* Add shortcut properties to help get components from the scheduler and scheduled job. `#387 <https://github.com/candango/firenado/issues/387>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
myst_parser>=0.16.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
redis==3.5.3 | ||
redis==4.1.2 | ||
hiredis==2.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
croniter==1.0.10 | ||
croniter==1.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sqlalchemy==1.4.26 | ||
sqlalchemy==1.4.31 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
behave==1.2.6 | ||
bandit==1.7.0 | ||
bandit>=1.7.0 | ||
pymysql==1.0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[metadata] | ||
license-file = LICENSE | ||
description-file = README.md | ||
license_file = LICENSE | ||
description_file = README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.