Halfapi

Latest version: v0.6.29

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

Scan your dependencies

Page 1 of 4

0.6.28

Dependencies

Starlette version bumped to 0.31 (had to disable a test to make it work but
seems not important).

Development dependencies

Python 3.7 is no longer supported (openapi_spec_validator is not compatible).

If you are a developper, you should update dev dependencies in your virtual
environment.

OpenAPI schemas

This release improves OpenAPI specification in routes, and gives a default
"parameters" field for routes that have path parameters.

Also, if you use halfAPI for multi-domain setups, you may be annoyed by the
change in the return value of the "/" route that differs from "/domain" route.

An HalfAPI instance should return one and only one OpenAPI Schema, so you can
rely on it to connect to other software.

The version number that is contained under the "info" dictionnary is now the "version"
of the Api domain, as specified in the domain dictionnary specified at the root
of the Domain.

The title field of the "info" dictionnary is now the Domain's name.

The ACLs list is now available under the "info.x-acls" attribute of the schema.
It is still accessible from the "/halfapi/acls" route.

Schema Components

You can now specify a dict in the domain's metadata dict that follows the
"components" key of an OpenAPI schema.

Use it to define models that are used in your API. You can see an exemple of
it's use in the "tests/dummy_domain/__init__.py" file.


ACLs

The use of an "HEAD" request to check an ACL is now the norm. Please change all
the occurrences of your calls on theses routes with the GET method.


CLI

Domain command update :

The `--conftest` flag is now allowed when running the `domain` command, it dumps the current configuration as a TOML string.

`halfapi domain --conftest my_domain`


The `--dry-run` flag was buggy and is now fixed when using the `domai ` command with the `--run` flag.


Configuration

The `port` option in a `domain.my_domain` section in the TOML config file is now prefered to the one in the `project` section.

The `project` section is used as a default section for the whole configuration file. - Tests still have to be written -

The standard configuration precedence is fixed, in this order from the hight to the lower :

- Argument value (i.e. : --log-level)
- Environment value (i.e. : HALFAPI_LOGLEVEL)
- Configuration value under "domain" key
- Configuration value under "project" key
- Default configuration value given in the "DEFAULT_CONF" dictionary of halfapi/conf.py

Logs

Small cleanup of the logs levels. If you don't want the config to be dumped, just set the HALFAPI_LOGLEVEL to something different than "DEBUG".

0.6.27

Breaking changes

- ACLs definition can now include a "public" parameter that defines if there should be an automatic creation of a route to check this acls
- /halfapi/acls does not return the "result", it just returns if there is a public route to check the ACL on /halfapi/acls/acl_name

0.6.26

- Adds the "base_url", "cookies" and "url" to the "halfapi" argument of route definitions

0.6.25

- Deletes the "Authorization" cookie on authentication error
- Do not raise an exception on signature expiration, use "Nobody" user instead

0.6.24

- Uses the "Authorization" cookie to read authentication token additionnaly to the "Authorization" header
- CLI : allows to run a single domain using the "halfapi domain --run domain_name" command

0.6.23

Dependency update version

- starlette v0.23
- orjson v3.8.5
- click v8
- pyJWT v2.6
- pyYAML v6
- toml v0.10

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.