Skip to main content

Mach4 is a Python3 API framework based on Flask.

Project description

What is Mach4

Mach4 is a Python3 framework allowing the creation of APIs in a simple, fast and secure way, by managing Json Web Token signature.

Why use an API framework

Mach4 provides the developer with a security system that allows the developer to develop its APIs while guaranteeing the authentication of its end users.

Concrete case study

A developer wants to create a service. This service requires the use of an API to allow each user's information to be stored. But the developer wants a user to have access only to his information, of course. To do this, he could create an API in Python with Flask or Django, create a reliable authentication system meeting the latest security standards using Json Web Token, add a double security system to prevent the exploitation of XSS and CRSF vulnerabilities, manage the expiration of digital signature keys, allow the verification of his digital signatures... or simply design his API using Mach4, without worrying about its security.

Why Mach4 and not another

Unlike other API frameworks such as Amazon API Gateway, Mach4 is not proprietary. Mach4 is available under the Apache 2.0 license, which guarantees complete transparency, so you can be sure that GAFAM will not use your users' personal data. Nor are you limited to a cloud platform. Mach4 being Open Source, you can use it on any platform you wish, or even develop your own.

How to use Mach4

1. Install

python3 -m pip install mach4 

2. Import

import mach4 

3. Initialise

api = mach4.API("My API Name", "1.0", __name__)

4. Add

def index():
	return "You’re logged!"
api.add_route("/index", accept_method = ["GET", "POST"], auth_required = True)

Documentation

Refer to in-code comments.

License

Copyright 2021 Cyriaque Perier

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mach4-0.2.0.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mach4-0.2.0-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file mach4-0.2.0.tar.gz.

File metadata

  • Download URL: mach4-0.2.0.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.10

File hashes

Hashes for mach4-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c8cc72e8d4a901503fb73c964dedfba2bbad0b8e933309f2a8dbe69ba14e517a
MD5 1666ffc1096a6e084fde7c260a59331d
BLAKE2b-256 abc484a40b262ebb32650e2f9be12127719b558a15605adb116fed940f04de78

See more details on using hashes here.

File details

Details for the file mach4-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: mach4-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.10

File hashes

Hashes for mach4-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 95c7c01741729340dd9138534942360e129cf8321897e1b21306b64789d7a550
MD5 6dd84c0d7fcc27e7f40a7b077e783b66
BLAKE2b-256 fcadd76afe9be74cd3d0343c8bef1d7dbd1f926d5d7922a4518572faa26e7dc7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page