Skip to content

Commit 0322726

Browse files
Merge pull request #1 from FireTail-io/test-branch
Rebranding pointsecio to firetail
2 parents b9ff3b1 + 883366d commit 0322726

File tree

118 files changed

+591
-592
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+591
-592
lines changed

.github/ISSUE_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
Output of the commands:
2020

2121
- `python --version`
22-
- `pip show pointsecio | grep "^Version\:"`
22+
- `pip show firetail | grep "^Version\:"`

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
build
22
dist
3-
pointsecio.egg-info
3+
firetail.egg-info
44
__pycache__
55
.coverage
66
*.egg

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
include *.txt
22
include *.rst
3-
recursive-include pointsecio/resources *.json
3+
recursive-include firetail/resources *.json

README.rst

+61-61
Large diffs are not rendered by default.

docs/Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,17 @@ qthelp:
8585
@echo
8686
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
8787
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
88-
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/PointSecIO.qhcp"
88+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Firetail.qhcp"
8989
@echo "To view the help file:"
90-
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/PointSecIO.qhc"
90+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Firetail.qhc"
9191

9292
devhelp:
9393
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
9494
@echo
9595
@echo "Build finished."
9696
@echo "To view the help file:"
97-
@echo "# mkdir -p $$HOME/.local/share/devhelp/PointSecIO"
98-
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/PointSecIO"
97+
@echo "# mkdir -p $$HOME/.local/share/devhelp/Firetail"
98+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Firetail"
9999
@echo "# devhelp"
100100

101101
epub:

docs/cli.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
Command-Line Interface
22
======================
3-
For convenience PointSecIO provides a command-line interface
3+
For convenience Firetail provides a command-line interface
44
(CLI). This interface aims to be a starting point in developing or
5-
testing OpenAPI specifications with PointSecIO.
5+
testing OpenAPI specifications with Firetail.
66

77
The available commands are:
88

9-
- ``pointsecio run``
9+
- ``firetail run``
1010

1111
All commands can run with -h or --help to list more information.
1212

1313
Running an OpenAPI specification
1414
--------------------------------
1515

16-
The subcommand ``run`` of PointSecIO's CLI makes it easy to run OpenAPI
16+
The subcommand ``run`` of Firetail's CLI makes it easy to run OpenAPI
1717
specifications directly even before any operation handler function gets
1818
implemented. This allows you to verify and inspect how your API will
19-
work with PointSecIO.
19+
work with Firetail.
2020

2121
To run your specification, execute in your shell:
2222

2323
.. code-block:: bash
2424
25-
$ pointsecio run your_api.yaml --stub --debug
25+
$ firetail run your_api.yaml --stub --debug
2626
27-
This command will tell PointSecIO to run the ``your_api.yaml``
27+
This command will tell Firetail to run the ``your_api.yaml``
2828
specification file attaching a stub operation (``--stub``) to the
2929
unavailable operations/functions of your API and in debug mode
3030
(``--debug``).
@@ -33,7 +33,7 @@ The basic usage of this command is:
3333

3434
.. code-block:: bash
3535
36-
$ pointsecio run [OPTIONS] SPEC_FILE [BASE_MODULE_PATH]
36+
$ firetail run [OPTIONS] SPEC_FILE [BASE_MODULE_PATH]
3737
3838
Where:
3939

@@ -47,7 +47,7 @@ list run:
4747

4848
.. code-block:: bash
4949
50-
$ pointsecio run --help
50+
$ firetail run --help
5151
5252
Running a mock server
5353
---------------------
@@ -58,4 +58,4 @@ Your API specification file is not required to have any ``operationId``.
5858

5959
.. code-block:: bash
6060
61-
$ pointsecio run your_api.yaml --mock=all -v
61+
$ firetail run your_api.yaml --mock=all -v

docs/conf.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# PointSecIO documentation build configuration file, created by
2+
# Firetail documentation build configuration file, created by
33
# sphinx-quickstart on Wed Jun 17 12:09:55 2015.
44
#
55
# This file is execfile()d with the current directory set to its
@@ -27,7 +27,7 @@
2727
# Add any Sphinx extension module names here, as strings. They can be
2828
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
2929
# ones.
30-
import pointsecio
30+
import firetail
3131
extensions = ['autoapi.extension']
3232

3333
autoapi_type = 'python'
@@ -40,7 +40,7 @@
4040
'imported-members']
4141
autoapi_python_class_content = 'both'
4242
autoapi_dirs = [
43-
'../pointsecio'
43+
'../firetail'
4444
]
4545

4646
# Add any paths that contain templates here, relative to this directory.
@@ -56,17 +56,17 @@
5656
master_doc = 'index'
5757

5858
# General information about the project.
59-
project = 'PointSecIO'
59+
project = 'Firetail'
6060
copyright = '2022, point security inc'
6161

6262
# The version info for the project you're documenting, acts as replacement for
6363
# |version| and |release|, also used in various other places throughout the
6464
# built documents.
6565
#
6666
# The short X.Y version.
67-
version = pointsecio.__version__.rsplit('.', 1)[0]
67+
version = firetail.__version__.rsplit('.', 1)[0]
6868
# The full version, including alpha/beta/rc tags.
69-
release = pointsecio.__version__
69+
release = firetail.__version__
7070

7171
# The language for content autogenerated by Sphinx. Refer to documentation
7272
# for a list of supported languages.
@@ -196,7 +196,7 @@
196196
# html_file_suffix = None
197197

198198
# Output file base name for HTML help builder.
199-
htmlhelp_basename = 'PointSecIOdoc'
199+
htmlhelp_basename = 'Firetaildoc'
200200

201201

202202
# -- Options for LaTeX output ---------------------------------------------
@@ -216,7 +216,7 @@
216216
# (source start file, target name, title,
217217
# author, documentclass [howto, manual, or own class]).
218218
latex_documents = [
219-
('index', 'PointSecIO.tex', 'PointSecIO Documentation',
219+
('index', 'Firetail.tex', 'Firetail Documentation',
220220
'point security inc', 'manual'),
221221
]
222222

@@ -246,7 +246,7 @@
246246
# One entry per manual page. List of tuples
247247
# (source start file, name, description, authors, manual section).
248248
man_pages = [
249-
('index', 'pointsecio', 'PointSecIO Documentation',
249+
('index', 'firetail', 'Firetail Documentation',
250250
['point security inc'], 1)
251251
]
252252

@@ -260,8 +260,8 @@
260260
# (source start file, target name, title, author,
261261
# dir menu entry, description, category)
262262
texinfo_documents = [
263-
('index', 'PointSecIO', 'PointSecIO Documentation',
264-
'point security inc', 'PointSecIO', 'One line description of project.',
263+
('index', 'Firetail', 'Firetail Documentation',
264+
'point security inc', 'Firetail', 'One line description of project.',
265265
'Miscellaneous'),
266266
]
267267

docs/cookbook.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
PointSecIO Cookbook
1+
Firetail Cookbook
22
==================
33

44
This section aims to be a cookbook of possible solutions for specific
5-
use cases of PointSecIO.
5+
use cases of Firetail.
66

77
Wildcard path parameters
88
------------------------
99

1010
Path parameters cannot contain slashes by default, but sometimes it's useful
1111
to have a path parameter which takes the full remainder of the HTTP path
1212
including slashes, e.g. to allow parsing "my/deep/path" from
13-
"/pages/my/deep/path". PointSecIO supports parsing such path remainders
13+
"/pages/my/deep/path". Firetail supports parsing such path remainders
1414
by using ``format: path``:
1515

1616
.. code-block:: yaml
@@ -32,7 +32,7 @@ Custom type format
3232
------------------
3333

3434
It is possible to define custom type formats that are going to be used
35-
by the PointSecIO payload validation on request parameters and response
35+
by the Firetail payload validation on request parameters and response
3636
payloads of your API.
3737

3838
Let's say your API deals with Products and you want to define a field
@@ -87,7 +87,7 @@ draft4 format checker decorator.
8787
...
8888
8989
This is all you need to have validation for that format in your
90-
PointSecIO application. Keep in mind that the format checkers should be
90+
Firetail application. Keep in mind that the format checkers should be
9191
defined and registered before you run your application server. A full
9292
example can be found at
9393
https://gist.github.com/rafaelcaricio/6e67286a522f747405a7299e6843cd93
@@ -96,15 +96,15 @@ https://gist.github.com/rafaelcaricio/6e67286a522f747405a7299e6843cd93
9696
CORS Support
9797
------------
9898

99-
CORS_ (Cross-origin resource sharing) is not built into PointSecIO, but you can use the `flask-cors`_ library
99+
CORS_ (Cross-origin resource sharing) is not built into Firetail, but you can use the `flask-cors`_ library
100100
to set CORS headers:
101101

102102
.. code-block:: python
103103
104-
import pointsecio
104+
import firetail
105105
from flask_cors import CORS
106106
107-
app = pointsecio.FlaskApp(__name__)
107+
app = firetail.FlaskApp(__name__)
108108
app.add_api('swagger.yaml')
109109
110110
# add CORS support
@@ -127,7 +127,7 @@ as possible when the program starts or you'll get the default configuration.
127127

128128
.. code-block:: python
129129
130-
import pointsecio
130+
import firetail
131131
from logging.config import dictConfig
132132
133133
@@ -142,7 +142,7 @@ as possible when the program starts or you'll get the default configuration.
142142
'handlers': ['syslog']
143143
}
144144
})
145-
app = pointsecio.FlaskApp(__name__)
145+
app = firetail.FlaskApp(__name__)
146146
app.app.logger.warn("I configured the flask logger!")
147147
app.add_api('swagger.yaml')
148148
app.run(port=8080)

docs/exceptions.rst

+17-17
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ Exception Handling
22
==================
33
Rendering Exceptions through the Flask Handler
44
----------------------------------------------
5-
Flask by default contains an exception handler, which pointsecio's app can proxy
5+
Flask by default contains an exception handler, which firetail's app can proxy
66
to with the ``add_error_handler`` method. You can hook either on status codes
77
or on a specific exception type.
88

9-
PointSecIO is moving from returning flask responses on errors to throwing exceptions
10-
that are a subclass of ``pointsecio.problem``. So far exceptions thrown in the OAuth
9+
Firetail is moving from returning flask responses on errors to throwing exceptions
10+
that are a subclass of ``firetail.problem``. So far exceptions thrown in the OAuth
1111
decorator have been converted.
1212

1313
Flask Error Handler Example
@@ -38,7 +38,7 @@ Firstly, it's possible to declare what Exception must be handled
3838
3939
4040
# init flask app
41-
import pointsecio
41+
import firetail
4242
4343
def not_found_handler(error):
4444
return {
@@ -49,17 +49,17 @@ Firstly, it's possible to declare what Exception must be handled
4949
5050
def create_app():
5151
52-
pointsecio_app = pointsecio.FlaskApp(
52+
firetail_app = firetail.FlaskApp(
5353
__name__, specification_dir="../api/")
54-
pointsecio_app.add_api(
54+
firetail_app.add_api(
5555
"openapi.yaml", validate_responses=True,
5656
base_path="/")
5757
5858
# Handle NotFoundException
59-
pointsecio_app.add_error_handler(
59+
firetail_app.add_error_handler(
6060
NotFoundException, not_found_handler)
6161
62-
app = pointsecio_app.app
62+
app = firetail_app.app
6363
return app
6464
6565
In this way, it's possible to raise anywhere the NotFoundException or its subclasses
@@ -88,12 +88,12 @@ and we know the API will return 404 status code.
8888
8989
Default Exception Handling
9090
--------------------------
91-
By default pointsecio exceptions are JSON serialized according to
91+
By default firetail exceptions are JSON serialized according to
9292
`Problem Details for HTTP APIs`_
9393

94-
Application can return errors using ``pointsecio.problem`` or exceptions that inherit from both
95-
``pointsecio.ProblemException`` and a ``werkzeug.exceptions.HttpException`` subclass (for example
96-
``werkzeug.exceptions.Forbidden``). An example of this is the ``pointsecio.exceptions.OAuthProblem``
94+
Application can return errors using ``firetail.problem`` or exceptions that inherit from both
95+
``firetail.ProblemException`` and a ``werkzeug.exceptions.HttpException`` subclass (for example
96+
``werkzeug.exceptions.Forbidden``). An example of this is the ``firetail.exceptions.OAuthProblem``
9797
exception
9898

9999
.. code-block:: python
@@ -106,25 +106,25 @@ exception
106106

107107
Examples of Custom Rendering Exceptions
108108
---------------------------------------
109-
To custom render an exception when you boot your pointsecio application you can hook into a custom
109+
To custom render an exception when you boot your firetail application you can hook into a custom
110110
exception and render it in some sort of custom format. For example
111111

112112

113113
.. code-block:: python
114114
115115
from flask import Response
116-
import pointsecio
117-
from pointsecio.exceptions import OAuthResponseProblem
116+
import firetail
117+
from firetail.exceptions import OAuthResponseProblem
118118
119119
def render_unauthorized(exception):
120120
return Response(response=json.dumps({'error': 'There is an error in the oAuth token supplied'}), status=401, mimetype="application/json")
121121
122-
app = pointsecio.FlaskApp(__name__, specification_dir='./../swagger/', debug=False, swagger_ui=False)
122+
app = firetail.FlaskApp(__name__, specification_dir='./../swagger/', debug=False, swagger_ui=False)
123123
app.add_error_handler(OAuthResponseProblem, render_unauthorized)
124124
125125
Custom Exceptions
126126
-----------------
127-
There are several exception types in pointsecio that contain extra information to help you render appropriate
127+
There are several exception types in firetail that contain extra information to help you render appropriate
128128
messages to your user beyond the default description and status code:
129129

130130
OAuthProblem

docs/index.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
.. PointSecIO documentation master file, created by
1+
.. Firetail documentation master file, created by
22
sphinx-quickstart on Wed Jun 17 12:09:55 2015.
33
You can adapt this file completely to your liking, but it should at least
44
contain the root `toctree` directive.
55
6-
Welcome to PointSecIO's documentation!
6+
Welcome to Firetail's documentation!
77
=====================================
88

9-
PointSecIO is a framework on top of Flask_ that automagically handles
9+
Firetail is a framework on top of Flask_ that automagically handles
1010
HTTP requests defined using `OpenAPI`_ (formerly known
1111
as Swagger), supporting both `v2.0`_ and `v3.0`_ of the specification.
1212

13-
PointSecIO allows you to write these specifications, then maps the
13+
Firetail allows you to write these specifications, then maps the
1414
endpoints to your Python functions. This is what makes it unique from
1515
other tools that generate the specification based on your Python
1616
code. You are free to describe your REST API with as much detail as
17-
you want and then PointSecIO guarantees that it will work as
18-
you specified. We built PointSecIO this way in order to:
17+
you want and then Firetail guarantees that it will work as
18+
you specified. We built Firetail this way in order to:
1919

2020
- Simplify the development process
2121
- Reduce misinterpretation about what an API is going to look like

0 commit comments

Comments
 (0)