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.1.2.tar.gz (12.4 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.1.2-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mach4-0.1.2.tar.gz
  • Upload date:
  • Size: 12.4 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.1.2.tar.gz
Algorithm Hash digest
SHA256 e10a884452387e0ec4c7604972577b86cac6de28739b17ea6d71ae4a67291195
MD5 ce3563f5737915cfa02a5b24705df7c3
BLAKE2b-256 fd2c8d29acf9d488b2e511169ca070da7a3e850775649fb38dd46fbcb4140fc5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mach4-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.6 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.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f5ffabd6ead4ab4395dc1631b736ef8c4294a8740b4edbf487eab77e6036c832
MD5 3c2c314f7cd25206c833dd27791ac447
BLAKE2b-256 63282b0677b46350d6baf2d694c05712097f9291440f4ee992f0cb190936e404

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