Skip to main content

flake8 plugin for using json from stdlib

Project description

flake8-no-json

Build Status codecov Python Version wemake-python-styleguide

Background

This is a Flake8 plugin that prevents the use of the standard json package in Python code. The intent is to enforce the use of an alternative JSON handling library, such as ujson, orjson, or any other specified by your project guidelines.

Installation

To install flake8-no-json, you can use pip:

pip install flake8-no-json

Usage

Once installed, the plugin will automatically be used when running Flake8. There is no additional configuration required.

Run Flake8 as you normally would:

flake8 your_project/

The plugin will raise an error whenever it detects an import of the json package:

import json  # FJ001: Usage of the 'json' package is not allowed.

License

MIT

Credits

This project was generated with wemake-python-package. Current template version is: 9899cb192f754a566da703614227e6d63227b933. See what is updated since then.

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

flake8_no_json-0.0.2.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

flake8_no_json-0.0.2-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file flake8_no_json-0.0.2.tar.gz.

File metadata

  • Download URL: flake8_no_json-0.0.2.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.1 Linux/6.5.0-1025-azure

File hashes

Hashes for flake8_no_json-0.0.2.tar.gz
Algorithm Hash digest
SHA256 4df3afce4c82a7d48e370383b855118cf2d423256882616dc8acb86911cf9f24
MD5 41c003d1ee56557efe6655ecd8a3a865
BLAKE2b-256 e3b4c11e9318a420bf93c088dfdeba801c493cdbda3dea18a5d349e1be39e7b5

See more details on using hashes here.

File details

Details for the file flake8_no_json-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: flake8_no_json-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.1 Linux/6.5.0-1025-azure

File hashes

Hashes for flake8_no_json-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 32571354726c2bac3055e0230e79412431b679eb11572289172bbc00be0b6e97
MD5 353a71d1499234bcb81009c367870b48
BLAKE2b-256 35b0b10b71b14152212e79f35e4c8126d136b42c408c9eb3c9b4a50e7f21329b

See more details on using hashes here.

Supported by

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