faker-security-0.3.1
توضیحات
Faker provider for security related data
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | faker-security-0.3.1 |
| نام | faker-security |
| نسخه کتابخانه | 0.3.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Snyk Security R&D |
| ایمیل نویسنده | security-engineering@snyk.io |
| آدرس صفحه اصلی | https://github.com/snyk/faker-security |
| آدرس اینترنتی | https://pypi.org/project/faker-security/ |
| مجوز | Apache-2.0 |
# Faker-Security
[](https://pypi.org/project/faker-security/)
[](https://circleci.com/gh/snyk/faker-security/tree/main)
Provider for [Faker](https://github.com/joke2k/faker)
to generate random/fake data related to security.
## Requirements
- Faker
- Python 3.8+
## Installation and Usage
If you want to use `faker-security` within your project, add it to your dependency file of choice.
This is typically your project's `requirements.txt` file. If you are using a higher-level package manager like `poetry` or `pipenv`, follow their instructions for adding new packages.
Once installed, you need to setup `Faker` to make use of the `SecurityProvider`. An example of how that could be done is shown below:
```python
from faker import Faker
from faker_security.providers import SecurityProvider
fake = Faker()
fake.add_provider(SecurityProvider)
# generate a CVSSv3 vector
fake.cvss3()
```
## Provider Features
- `cvss3`: generates a CVSS v3 vector
- `cvss2`: generates a CVSS v2 vector
- `version`: generates a [semver version number](https://semver.org/)
- `npm_semver_range`: generates a [npm compatible semver version range](https://docs.npmjs.com/about-semantic-versioning)
- `cwe`: generates a CWE identifier
- `cve`: generates a CVE identifier
## Developing
- Install `poetry` and run `poetry install`
- Install `pre-commit` and run `pre-commit install --install-hooks`
## Testing
`poetry run pytest` to run tests.
نیازمندی
| مقدار | نام |
|---|---|
| >=8.2.1 | faker |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8,<4.0 | Python |
نحوه نصب
نصب پکیج whl faker-security-0.3.1:
pip install faker-security-0.3.1.whl
نصب پکیج tar.gz faker-security-0.3.1:
pip install faker-security-0.3.1.tar.gz