- Autogenerated views do not allow users to view them by a specific primary key argument, as the view might not have access to said arguments, now only GetAll is implemented.
- request body parameters now show up on silence console if the corresponding flag is true in settings.py
- wontfix for DB table capitalization, linux users beware.
- Privacy improvements for logging and debug
- No information is provided anymore on whether a user exists when trying to log in
- Fixed automated testing for Python 3.6 (actions/setup-python#544)
- Refactored README and moved most of the info to the newly created wiki page.
- Code refactoring and general performance improvements
- Silence now issues a warning when a configuration setting in
settings.py
is unknown. - Added autogeneration of a JS module for login and register, if they are enabled.
DATE
andTIME
columns are now also serialized in ISO format.- Autogenerate additional JS methods to query views by the primary keys from other tables that they contain.
- The
createapi
andcreatetests
commands now support tables without a PK. - Some code refactoring and improvements.
- Some improvements to logging:
- Full stack traces are now only printed if the debug mode is active, otherwise, just the error string is shown.
- The month in the access logs is now numerical instead of textual.
- Colors are (hopefully!) no longer mixed up on Windows when access and non-access log appear in quick succession.
- Fixed some bugs from the previous update and made detection of Flask logs more robust.
- Fixed the logging style after updating Flask.
- Big upgrade to all dependencies, especially to Flask to prevent a bug in Flask 1.X due to a recently upgraded transitive dependency (pallets/flask#4494).
- Improvements to some messages and formatting for the autogenerated JS files.
- The warning message when a new version is available now also includes a link to the changelog.
- Altered the test creator suite to better show the user what the different tests are doing, as well as replace the registration default test with a login one.
- Fixed a bug where tests could not be automatically generated if a
tests/
folder was not present.
- Fixed a bug where the autogenerated endpoints would not contain a field for the primary key if it was not autoincrement
- Added the setting
ALLOW_CLEAR_PASSWORDS
to allow clear text passwords stored in the users table to be used for login, defaults toFalse
.
- Added the posibility to use a
$loggedId
parameter in any SQL query, which is replaced by the value of the primary key of the user performing the request. If the user is not authenticated, it becomesNULL
. Thanks to @S0ULIS for the pull request! - Added a new optional
active_status
attribute forUSER_AUTH_DATA
. By setting this to the name of a boolean column in the users table, Silence will check whether the user is active when logging in. This can be disabled either by not specifying this attribute, or by setting theCHECK_USER_IS_ACTIVE
setting toFalse
. - Added some info about Silence's maintainers in the autogenerated JS files.
- Fixed a bug regarding the access restriction via roles.
- Updated README
- IMPORTANT: Silence v2 is not compatible with projects generated using Silence v1.
- Added fine-grained endpoint access by role:
- Added a new optional
role
key to specify the role column inUSER_AUTH_DATA
. - Added a new
DEFAULT_ROLE_REGISTER
setting to specify the role that should be assigned to new users when using the/register
endpoint. - Added a new
allowed_roles
parameters for the@endpoint
decorator, which receives a list of the roles that can access the endpoint. There is a special value,*
, which allows all roles to use the endpoint.
- Added a new optional
- Added a new way of creating endpoints as JSON files
- Added a new
createapi
command to auto generate the .json endpoint files and .js api consumption files automatically based on the database tables and already defined endpoints by the user. This feature can be toggled throughENABLE_ENDPOINT_AUTO_GENERATION
in thesettings.py
file.
- Changed the serialization of datetime objects to follow ISO 8601.
- Bumped Flask-CORS to 3.0.9.
- Migrated the CI testing from Travis to GitHub Actions.
- Set the MIME type of
.js
files toapplication/javascript
manually, to prevent the wrong type from being dispatched due to bad configurations of the Windows registry.
- Added a new
HTTP_CACHE_TIME
setting to control caching of static web files. Defaults to 0 for easier development, which means that all static files (HTML, JS, CSS...) are not cached by web browsers. - The list of all loaded endpoints is now displayed when using
silence new
. Added a newSHOW_ENDPOINT_LIST
setting to disable this behavior. - The
SECRET_KEY
is now changed in-place when creating a project from a repo URL if it already exists, instead of always adding it in a new line with the info comments.
- Added
cryptography
to dependencies for compatibility with MySQL.
- Improvements to
silence new
:- It now requires a project name, i.e., you cannot use
silence new
without at least one argument. - It downloads a certain template by default, right now, 'employees'.
- A different template can be specified using the
--template
argument. - A GitHub repo URL can be provided using the
--url
argument. Note that--template
and--url
are mutually exclusive. - The
--blank
parameter is provided as a shorthand for--template blank
. - It now removes any
.gitkeep
files found in the downloaded project. - If a
SECRET_KEY
is already set for the downloaded project,silence new
deletes it and provides a new, randomly generated one. - A warning is issued if a
settings.py
file cannot be found in the downloaded project. - It automatically determines the default branch name for the repository to download, instead of assuming "master" (yes, I'm looking at you, "main").
- It now requires a project name, i.e., you cannot use
- A new command,
silence list-templates
, retrieves the list of existing project templates. - Minor: Vectorized logo shown in README.md.
- Set the default address for the webserver to
127.0.0.1
instead of0.0.0.0
- Removed the default
SECRET_KEY
, it is now always required to provide one
- Updated README
- Fixed 500 errors when simplejson was installed alongside Silence
- Fixed SQL params not always being filled correctly in GET requests if more than one param is used
- Added a check for new Silence versions when using
silence run
, and aCHECK_FOR_UPDATES
configuration parameter to opt out of this check - Add support for storing the endpoint files in a folder named
endpoints/
instead ofapi/
. The support for anapi/
folder will be dropped in the future. - Display a warning message if endpoints are found in the
api/
folder instead ofendpoints/
- Fixed encoding errors that resulted in 500 errors
- The endpoint loader now doesn't try to load non-Python files, which resulted in a fatal error
- Fixed compatibility with DECIMAL columns
- Added a new
-v
/--version
command
- Fixed a bug where
silence createdb
wouldn't work for certain database names
- Added logo and updated README
- Added
ENABLE_SUMMARY
andCOLORED_OUTPUT
configuration parameters
- Changed repo ownership
- Fixed a bug where the template project couldn't be downloaded if Silence wasn't installed inside a virtualenv
- Fixed a bug where ordering didn't work properly for non-string fields
- First release!
- Removed the API tree on startup since it could cause issues
- API calls that perform update operations now return the last modified ID in a JSON response
- Proper README
- Added a summary of API endpoints with their descriptions in the base URL
- Automatic column name casing for the login and register endpoints
- Display the API structure as a tree during startup
- Run server on all network interfaces
- Automatically set up a permissive CORS setting
- Added support for application/json as encoding for POST/PUT requests
- Added configuration options to disable login and register
- Custom formatting for HTTP log messages
- Use a connection pool to connect to the DB
- Added support for the default endpoints /login and /register using custom tables and fields
- Added support for session tokens and authentication requirements
- Added support for HTTP POST/PUT/DELETE and SQL INSERT/UPDATE/DELETE
- Added support for static web files
- Added support for HTTP GET / SQL SELECT (URL params, query filtering...)
- Improvements in version handling
- Improvements in GitHub automated actions
- Fixing the PyPI publication workflow
- Added PyPI badge in README
- Specified minimum Python version in setup.py
- Continuous integration and deployment using Travis and GitHub actions
- Fixed a wrong link in setup.py
- Minimized the number of dependencies
- Initial version, work in progress