
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
[!WARNING] DEPRECATION NOTICE: The Censys Search v1 and v2 APIs will be deprecated soon. Please migrate to the new Censys Platform API.
- 📖 New API Documentation: https://docs.censys.com/reference/get-started#/
- 📦 New Python SDK: Install with
pip install censys-platform
- https://pypi.org/project/censys-platform/The Censys ASM APIs in this library are NOT deprecated and will continue to be supported.
An easy-to-use and lightweight API wrapper for Censys APIs (censys.io). Python 3.8+ is currently supported. This library has been tested on Python 3.8 and 3.x (Currently version 3.10).
Notice: The Censys Search v1 endpoints are deprecated as of Nov. 30, 2021. Please begin using v2 endpoints to query hosts and certificates and check out our support center for resources.
[!IMPORTANT] This library does not support the new Censys Platform, however a new set of SDKs that do support the platform are coming soon. Please refer to the platform API refrence docs in the mean time.
The library can be installed using pip
.
pip install censys
To upgraded using pip
.
pip install --upgrade censys
Alternatively, you can install the library using poetry
.
git clone https://github.com/censys/censys-python.git
cd censys-python/
poetry install
Optionally, you can enable tab completion for the CLI by adding this line to your ~/.bashrc
, ~/.zshrc
, or equivalent.
Please note that autocomplete is supported for field names in the
search
command.
eval "$(register-python-argcomplete censys)"
To configure your search credentials run censys config
or set both CENSYS_API_ID
and CENSYS_API_SECRET
environment variables.
$ censys config
Censys API ID: XXX
Censys API Secret: XXX
Do you want color output? [y/n]: y
Successfully authenticated for your@email.com
If you have a Censys ASM account, you can configure your ASM credentials by running censys asm config
or set both CENSYS_ASM_API_KEY
environment variables.
$ censys asm config
Censys ASM API Key: XXX
Do you want color output? [y/n]: y
Successfully authenticated
The examples located in the examples/
directory are a great place to start. You can also find more examples in the usage documentation.
All contributions (no matter how small) are always welcome. See Contributing to Censys Python
This project uses poetry for dependency management. Please ensure you have installed the latest version.
git clone git@github.com:censys/censys-python.git
cd censys-python/
poetry install
# Run tests
poetry run pytest
# With coverage report
poetry run pytest --cov-report html
This software is licensed under Apache License, Version 2.0
FAQs
An easy-to-use and lightweight API wrapper for Censys APIs (censys.io).
We found that censys demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.