Registry / security / minfraud

minfraud

JSON →
library3.2.0pypypi✓ verified 80d ago

Official MaxMind minFraud API client for Python. Provides risk scoring and device/location intelligence for fraud detection. Latest version 3.2.0, requires Python >=3.10. Released irregularly as needed.

pip install minfraud
INSTALL
IMPORT
SIG · MINFRAUD
M
minfraud
securitypythonv3.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Client
from minfraud import Client
from minfraud import minFraud
AsyncClient
from minfraud import AsyncClient
models
from minfraud import models

Initialize minFraud client with account ID and license key from environment variables, then perform an Insights request.

import os from minfraud import minFraud client = minFraud( account_id=int(os.environ.get('MAXMIND_ACCOUNT_ID', '0')), license_key=os.environ.get('MAXMIND_LICENSE_KEY', '') ) result = client.insights( device={ 'ip_address': '81.2.69.160', 'user_agent': 'Mozilla/5.0', 'accept_language': 'en-US' }, event={ 'transaction_id': 'txn12345', 'shop_id': 'shop1', 'time': '2023-08-01T12:00:00Z', 'type': 'purchase' }, account={ 'user_id': 'user123', 'username': 'testuser' } ) print(result.risk_score)
Debug
Known issues
breakingIn version 3.0.0, the method name changed from `score()` to `insights()` and `factors()` to `insights()` with additional fields.
fix
Replace `client.score(...)` with `client.insights(...)`. The return object structure also changed.
affects: <3.0.0
breakingIn version 3.0.0, the response object is no longer a dict but a custom model object. Access fields like `result.risk_score` instead of `result['risk_score']`.
fix
Use attribute access on the returned object.
affects: <3.0.0
deprecatedThe `minFraudClient` class from the `minfraud` package was renamed to `minFraud` in version 3.0.0. The old name still works but is deprecated.
fix
Use `from minfraud import minFraud` instead of `from minfraud import minFraudClient`.
affects: >=3.0.0
gotchaThe `ip_address` field in the device object is required for all API calls. Omitting it raises a validation error.
fix
Always include `ip_address` in the device dictionary.
affects: all
gotchaThe `account_id` must be an integer. Passing a string will cause a type error.
fix
Use `int(os.environ['MAXMIND_ACCOUNT_ID'])` to ensure integer type.
affects: all
Upgrade
Version history
3.2.0latest on PyPI · released Nov 20, 2025
Audit
Dependencies
requestsrequiredHTTP client for API calls
geoip2optionalIP geolocation fallback
maxminddboptionalMaxMind database reader
Agent activity
5 hits · last 30 days
node
4
OpenAI (training)
1
Resources

No resource links recorded.

minfraud — pip install minfraud · libregistry