Fake-api-server

Latest version: v0.4.2

Safety actively analyzes 722617 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.4.2

๐ŸŽ‰ New feature

1. Support Python **3.13** version. ([PR483])
2. Add new value format properties:
1. ``static_value``: New strategy for setting fixed value. ([PR489])
2. ``format.static_value``: The specific fixed value for the strategy ``static_value``, includes this property in `format.variable`. ([PR489], [PR490], [PR491])
3. ``format.unique_element``: Only for array type value which could generate unique elements in array type property, includes this property in `format.variable`. ([PR494])
3. Support API request could accept multiple different value formats, i.e., ISO format or Unix timestamp of datetime value. ([PR488])

[PR483]: https://github.com/Chisanan232/PyFake-API-Server/pull/483
[PR488]: https://github.com/Chisanan232/PyFake-API-Server/pull/488
[PR489]: https://github.com/Chisanan232/PyFake-API-Server/pull/489
[PR490]: https://github.com/Chisanan232/PyFake-API-Server/pull/490
[PR491]: https://github.com/Chisanan232/PyFake-API-Server/pull/491
[PR494]: https://github.com/Chisanan232/PyFake-API-Server/pull/494


๐Ÿ”จ Breaking changes

1. Deprecate Python 3.8 version support, will remove all code in next version. ([PR498])


๐Ÿชฒ Bug Fix

๐Ÿ™‹โ€โ™‚๏ธ For production

1. ๐Ÿ’ฃ Critical bugs:
1. Command line tool cannot work finely because filtering logic cannot cover all scenarios. ([PR496])
2. Command line tool cannot work finely because missing Python dependency. ([PR498])
2. ๐Ÿฆ  Major bugs:
1. The request checking process: ([PR493])
1. Error messages are incorrect which would deeply mislead developers.
2. The parameters data checking cannot work finely with array type parameters.
2. It set incorrect customized value at format property with subcommand line `pull`. ([PR487])
3. Generate incorrect data structure in API response. ([PR492])
3. ๐Ÿ› Mirror bugs:
1. Command line option `--include-template-config` cannot work under subcommand line `pull`. ([PR485])
2. Default value cannot be set correctly if it's empty string value. ([PR484])

[PR484]: https://github.com/Chisanan232/PyFake-API-Server/pull/484
[PR485]: https://github.com/Chisanan232/PyFake-API-Server/pull/485
[PR487]: https://github.com/Chisanan232/PyFake-API-Server/pull/487
[PR485]: https://github.com/Chisanan232/PyFake-API-Server/pull/485
[PR485]: https://github.com/Chisanan232/PyFake-API-Server/pull/485
[PR485]: https://github.com/Chisanan232/PyFake-API-Server/pull/485
[PR492]: https://github.com/Chisanan232/PyFake-API-Server/pull/492
[PR493]: https://github.com/Chisanan232/PyFake-API-Server/pull/493
[PR496]: https://github.com/Chisanan232/PyFake-API-Server/pull/496
[PR498]: https://github.com/Chisanan232/PyFake-API-Server/pull/498

๐Ÿ‘จโ€๐Ÿ’ป For development

1. The file path regular expression is incorrect at documentation CI workflow. ([PR499])

[PR499]: https://github.com/Chisanan232/PyFake-API-Server/pull/499


[//]: ( โ™ป๏ธ Refactor)

[//]: ()
[//]: (1. content ...)


๐Ÿ€ Improvement

1. Clear the Pre-Commit configuration. ([PR481])
2. Clear the CI workflow configurations. ([PR482])
3. Let program could raise obvious error message if it misses some necessary values at initial process. ([PR486])

[PR481]: https://github.com/Chisanan232/PyFake-API-Server/pull/481
[PR482]: https://github.com/Chisanan232/PyFake-API-Server/pull/482
[PR486]: https://github.com/Chisanan232/PyFake-API-Server/pull/486


๐Ÿ“‘ Docs

1. Update the content for new command line options. ([PR487])

[PR487]: https://github.com/Chisanan232/PyFake-API-Server/pull/497


[//]: ( ๐Ÿค– Upgrade dependencies)

[//]: ()
[//]: ([//]: &40;1. Upgrade the Python dependencies.&41;)
[//]: ()
[//]: (1. Upgrade pre-commit dependencies.)

[//]: (3. Upgrade the CI reusable workflows.)

[//]: ()
[//]: ( 1. Upgrade SonarQube and update its configuration)

[//]: ()
[//]: ( 2. Update the usage because upgrading the artifact actions)

[//]: ( ๐ŸšฎDeprecate)

[//]: ()
[//]: (1. Deprecate and remove version 0.3.0 because it has multiple issue, and it cannot upload same version file to PyPI.)

0.4.1

๐ŸŽ‰ New feature

1. Support running fake server process in background and redirect the access log to the specific log file.
1. ``--daemon``: daemonize the fake server process.
2. ``--access-log-file``: redirect the fake server access log to the specific file.


๐Ÿชฒ Bug Fix

1. Fix the issue about it cannot get the correct versioning info in documentation.


[//]: ( โ™ป๏ธ Refactor)

[//]: ()
[//]: (1. content ...)


[//]: ( ๐Ÿ€ Improvement)

[//]: ()
[//]: (1. content ...)


๐Ÿ“‘ Docs

1. Update the content for new command line options.


๐Ÿค– Upgrade dependencies

[//]: (1. Upgrade the Python dependencies.)

1. Upgrade pre-commit dependencies.

[//]: (3. Upgrade the CI reusable workflows.)

[//]: ()
[//]: ( 1. Upgrade SonarQube and update its configuration)

[//]: ()
[//]: ( 2. Update the usage because upgrading the artifact actions)

[//]: ( ๐ŸšฎDeprecate)

[//]: ()
[//]: (1. Deprecate and remove version 0.3.0 because it has multiple issue, and it cannot upload same version file to PyPI.)

0.4.0

๐ŸŽ‰ New feature

1. Support new properties for customizing the values in request or response.
1. ``format``: setting the format of value how it should be in request or return in response.
2. ``variables``: for reusable usage in formatting value.
3. ``size``: setting the value size. If it's ``str`` type, this is the length limitation; if it's ``int`` or other numeric type value, this is the value limitation.
4. ``digit``: setting the decimal policy.
2. Support setting the format properties in template section.
3. Re-fine the command line interface to be more friendly and more readable in usage.


๐Ÿชฒ Bug Fix

1. Fix broken tests in some specific Python versions.
2. Fix the broken CI workflow about auto-merge the upgrade dependencies PRs which has been approved.


โ™ป๏ธ Refactor

1. Re-fine the pure data into data models in data processing of handling API documentation.
2. Adjust the modules structure about core logic of API server processing with classifying by API server type.
3. Refactor the modules structure of command line options, processors and components.
4. Refactor the enum objects into the module or sub-package which are deeply relative with their meaning.
5. Extract the file operation logic into new sub-package in __util_.


๐Ÿ€ Improvement

1. Rename the Python package and project again as **_PyFake-API-Server_** to avoid similar project naming issue in PyPI
2. Improve the CD workflows which would only br triggered by updating version info.
3. Let the error message to be more clear and readable for incorrect usage.
4. Let the version info to be more readable and detail.


๐Ÿ“‘ Docs

1. Update the content for all changes.
2. Import the versioning feature into documentation.


๐Ÿค– Upgrade dependencies

1. Upgrade the Python dependencies.
2. Upgrade pre-commit dependencies.
3. Upgrade the CI reusable workflows.
1. Upgrade SonarQube and update its configuration
2. Update the usage because upgrading the artifact actions

๐ŸšฎDeprecate

1. Deprecate and remove version 0.3.0 because it has multiple issue, and it cannot upload same version file to PyPI. ๐Ÿ˜ญ

0.3.0

๐ŸŽ‰ New feature

1. Support new properties for customizing the values in request or response.
1. ``Format``: setting the format of value how it should be in request or return in response.
2. ``Variable``: for reusable usage in formatting value.
3. ``size``: setting the value size. If it's ``str`` type, this is the length limitation; if it's ``int`` or other numeric type value, this is the value limitation.
4. ``digit``: setting the decimal policy.
2. Support setting the format properties in template section.
3. Re-fine the command line interface to be more friendly and more readable in usage.


๐Ÿชฒ Bug Fix

1. Fix broken tests in some specific Python versions.
2. Fix the broken CI workflow about auto-merge the upgrade dependencies PRs which has been approved.


โ™ป๏ธ Refactor

1. Re-fine the pure data into data models in data processing of handling API documentation.
2. Adjust the modules structure about core logic of API server processing with classifying by API server type.
3. Refactor the modules structure of command line options, processors and components.
4. Refactor the enum objects into the module or sub-package which are deeply relative with their meaning.
5. Extract the file operation logic into new sub-package in __util_.


๐Ÿ€ Improvement

1. Improve the CD workflows which would only br triggered by updating version info.
2. Let the error message to be more clear and readable for incorrect usage.
3. Let the version info to be more readable and detail.


๐Ÿ“‘ Docs

1. Update the content for all changes.
2. Import the versioning feature into documentation.


๐Ÿค– Upgrade dependencies

1. Upgrade the Python dependencies.
2. Upgrade pre-commit dependencies.
3. Upgrade the CI reusable workflows.

0.2.0

๐ŸŽ‰๐ŸŽŠ๐Ÿพ New feature
<hr>

1. Support parsing version2 (aka Swagger) and version3 OpenAPI document configuration.
2. Support nested data structure about collection data types, i.e., ``list`` or ``dict``, in response.
3. Add new command line argument ``--source-file`` in sub-command line ``pull`` for being more convenience to pull configuration for **_PyMock-API_**.
4. Let sub-command line ``add`` support dividing feature.


๐Ÿ› ๐Ÿ›๐Ÿ’ฃ Bug Fix
<hr>

1. Fix some issues.
1. It cannot parse finely at the empty body of one specific column in response.
2. Fix broken tests.
3. Fix incorrect serializing logic if request parameter or body is empty.
4. Fix incorrect checking logic at configuration validation in sub-command line ``check``.
5. Fix the issue about it cannot work finely with argument ``--base-file-path`` in sub-command line ``pull``.


๐Ÿค–โš™๏ธ๐Ÿ”ง Improvement
<hr>

1. Upgrade the dependencies.
2. Upgrade the reusable workflows in CI workflow.
3. Extract the logic about initialing test data for testing as modules.


๐Ÿ“๐Ÿ“‘๐Ÿ“—Docs
<hr>

1. Update the content for new feature.

0.1.0

๐ŸŽ‰๐ŸŽŠ๐Ÿพ New feature
<hr>

1. Provide command line interface ``mock-api`` for mocking HTTP server.

shell
usage: mock-api [SUBCOMMAND] [OPTIONS]

A Python tool for mocking APIs by set up an application easily. PyMock-API bases on Python web framework to set up application, i.e., you could select using *flask* to set up application to mock APIs.

options:
-h, --help show this help message and exit
-v, --version The version info of PyMock-API.

Subcommands:

{run,sample,add,check,get,pull}
run Set up APIs with configuration and run a web application to mock them.
sample Quickly display or generate a sample configuration helps to use this tool.
add Something processing about configuration, i.e., generate a sample configuration or validate configuration content.
check Check the validity of *PyMock-API* configuration.
get Do some comprehensive inspection for configuration.
pull Pull the API details from one specific source, e.g., Swagger API documentation.


2. Provide [documentation](https://chisanan232.github.io/PyMock-API/) for details of the project.

Links

Releases

ยฉ 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.