Skip to content

Commit 3fd109d

Browse files
committed
Initial commit
0 parents  commit 3fd109d

46 files changed

Lines changed: 2275 additions & 0 deletions

Some content is hidden

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

.coveragerc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[run]
2+
omit =
3+
*tests.py
4+
5+
[report]
6+
exclude_lines =
7+
pragma: no cover
8+
def __repr__
9+
raise NotImplementedError
10+
if __name__ == .__main__.:

.coveralls.yml

Whitespace-only changes.

.gitignore

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### VirtualEnv template
3+
# Virtualenv
4+
# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
5+
.Python
6+
[Bb]in
7+
[Ii]nclude
8+
[Ll]ib
9+
[Ll]ib64
10+
[Ll]ocal
11+
[Ss]cripts
12+
pyvenv.cfg
13+
.venv
14+
pip-selfcheck.json
15+
### Python template
16+
# Byte-compiled / optimized / DLL files
17+
__pycache__/
18+
*.py[cod]
19+
*$py.class
20+
21+
# C extensions
22+
*.so
23+
24+
# Distribution / packaging
25+
.Python
26+
build/
27+
develop-eggs/
28+
dist/
29+
downloads/
30+
eggs/
31+
.eggs/
32+
lib/
33+
lib64/
34+
parts/
35+
sdist/
36+
var/
37+
wheels/
38+
*.egg-info/
39+
.installed.cfg
40+
*.egg
41+
MANIFEST
42+
43+
# PyInstaller
44+
# Usually these files are written by a python script from a template
45+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
46+
*.manifest
47+
*.spec
48+
49+
# Installer logs
50+
pip-log.txt
51+
pip-delete-this-directory.txt
52+
53+
# Unit test / coverage reports
54+
htmlcov/
55+
.tox/
56+
.coverage
57+
.coverage.*
58+
.cache
59+
nosetests.xml
60+
coverage.xml
61+
*.cover
62+
.hypothesis/
63+
.pytest_cache/
64+
65+
# Translations
66+
*.mo
67+
*.pot
68+
69+
# Django stuff:
70+
*.log
71+
local_settings.py
72+
db.sqlite3
73+
74+
# Flask stuff:
75+
instance/
76+
.webassets-cache
77+
78+
# Scrapy stuff:
79+
.scrapy
80+
81+
# Sphinx documentation
82+
docs/_build/
83+
84+
# PyBuilder
85+
target/
86+
87+
# Jupyter Notebook
88+
.ipynb_checkpoints
89+
90+
# pyenv
91+
.python-version
92+
93+
# celery beat schedule file
94+
celerybeat-schedule
95+
96+
# SageMath parsed files
97+
*.sage.py
98+
99+
# Environments
100+
.env
101+
.venv
102+
env/
103+
venv/
104+
ENV/
105+
env.bak/
106+
venv.bak/
107+
108+
# Spyder project settings
109+
.spyderproject
110+
.spyproject
111+
112+
# Rope project settings
113+
.ropeproject
114+
115+
# mkdocs documentation
116+
/site
117+
118+
# mypy
119+
.mypy_cache/
120+
.idea
121+

.travis.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
language: python
2+
sudo: false
3+
language: python
4+
python:
5+
- 2.7
6+
cache: pip
7+
install:
8+
- pip install -r requirements-dev.txt
9+
- pip install coveralls
10+
11+
script:
12+
- coverage run --source flask_error setup.py test
13+
14+
notifications:
15+
email:
16+
- sonunitw12@gmail.com
17+
18+
after_success:
19+
coveralls

LICENSE.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Copyright (c) 2018- Sonu Kumar<sonunitw12@gmail.com>
2+
3+
All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions
7+
are met:
8+
1. Redistributions of source code must retain the above copyright
9+
notice, this list of conditions and the following disclaimer.
10+
2. Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in the
12+
documentation and/or other materials provided with the distribution.
13+
3. The name of the author may not be used to endorse or promote products
14+
derived from this software without specific prior written permission.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17+
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18+
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19+
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21+
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

MANIFEST.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include LICENSE.rst
2+
include README.rst
3+
recursive-include flask_error/templates *
4+
recursive-exclude flask_error *.pyc

README.rst

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
==============================
2+
Flask Error Monitor
3+
==============================
4+
5+
Full featured error monitor app for Flask
6+
7+
.. image:: https://travis-ci.org/sonus21/flask-error-monitor.svg?branch=master
8+
:target: https://travis-ci.org/sonus21/flask-error-monitor
9+
10+
.. image:: https://coveralls.io/repos/github/sonus21/flask-error-monitor/badge.svg
11+
:target: https://coveralls.io/github/sonus21/flask-error-monitor
12+
13+
Introduction
14+
------------
15+
16+
Flask-Error-Monitor is a batteries-included, simple-to-use `Flask <http://flask.pocoo.org/>`_ extension that lets you
17+
add error recording interfaces to Flask applications. It's implemented in such a way that the developer has total control of the resulting application.
18+
19+
Out-of-the-box, Flask-Error-Monitor plays nicely with various ORM's, including
20+
21+
- `SQLAlchemy <http://www.sqlalchemy.org/>`_,
22+
23+
- `MongoEngine <http://mongoengine.org/>`_,
24+
25+
- `pymongo <http://api.mongodb.org/python/current/>`_ and
26+
27+
28+
It also boasts a simple Model management interface.
29+
30+
The biggest feature of Flask-Error-Monitor is flexibility. To start off with you can create a very simple application in no time,
31+
with exception monitor enabled, but then you can go further and customize different aspects.
32+
33+
Flask-Error-Monitor is an active project, well-tested and production ready.
34+
35+
Installation
36+
------------
37+
To install Flask-Error-Monitor, simply::
38+
39+
git clone git@github.com:sonus21/flask-error-monitor.git
40+
cd flask-error-monitor
41+
python setup.py install
42+
43+
44+
Features
45+
-------------
46+
- Sensitive data( like *password*, *secret* ) Masking
47+
- Record all the frames ( frame data are stored in JSON format so that it can be analyzed later)
48+
- Unique URL generation
49+
- Number of times the exception occurred and first/last time of exception
50+
- Sending emails with exception details
51+
- Record different types of exception like 500 or 404 etc
52+
53+
Documentations
54+
-------------
55+
This has got extensive document browse at https://flask-error-monitor.readthedocs.io/en/latest/
56+
57+
All docs are in `docs/source`
58+
59+
And if you want to preview any *.rst* snippets that you may want to contribute, go to `http://rst.ninjs.org/ <http://rst.ninjs.org/>`_.
60+
61+
62+
Examples
63+
--------
64+
Several usage examples are included in the */tests* folder. Please feel free to add your own examples, or improve
65+
on some of the existing ones, and then submit them via GitHub as a *pull-request*.
66+
67+
You can see some of these examples in action at https://github.com/sonus21/flask-error-monitor/tree/master/examples.
68+
To run the examples on your local environment, one at a time, do something like::
69+
70+
cd flask-error-monitor
71+
python examples/simple/app.py
72+
73+
74+
Tests
75+
-----
76+
Test are run with *nose*. If you are not familiar with this package you can get some more info from `their website <https://nose.readthedocs.io/>`_.
77+
78+
To run the tests, from the project directory, simply::
79+
80+
pip install -r requirements-dev.txt
81+
nosetests
82+
83+
You should see output similar to::
84+
85+
.............................................
86+
----------------------------------------------------------------------
87+
Ran 26 tests in 1.144s
88+
89+
OK
90+
91+
92+
Contribution
93+
-------------
94+
You're most welcome to raise pull request or fixes.

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
SPHINXPROJ = flask-error-monitor
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/make.bat

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
set SPHINXPROJ=flask-error-monitor
13+
14+
if "%1" == "" goto help
15+
16+
%SPHINXBUILD% >NUL 2>NUL
17+
if errorlevel 9009 (
18+
echo.
19+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
20+
echo.installed, then set the SPHINXBUILD environment variable to point
21+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
22+
echo.may add the Sphinx directory to PATH.
23+
echo.
24+
echo.If you don't have Sphinx installed, grab it from
25+
echo.http://sphinx-doc.org/
26+
exit /b 1
27+
)
28+
29+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
30+
goto end
31+
32+
:help
33+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
34+
35+
:end
36+
popd

0 commit comments

Comments
 (0)