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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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