Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-organge.svg?logo=git&logoColor=organge)](http://makeapullrequest.com)
[![License](https://img.shields.io/github/license/censys/censys-python?logo=apache)](https://github.com/censys/censys-python/blob/main/LICENSE)

> [!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#/](https://docs.censys.com/reference/get-started#/)
> - 📦 **New Python SDK**: Install with `pip install censys-platform` - [https://pypi.org/project/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](https://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](https://support.censys.io/hc/en-us/sections/360013076551-Censys-Search-2-0) for resources.
Expand Down
11 changes: 11 additions & 0 deletions censys/search/v1/api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Base for interacting with the Censys Search API."""

import os
import warnings
from typing import List, Optional, Type

from requests.models import Response
Expand Down Expand Up @@ -39,6 +40,16 @@ def __init__(
Raises:
CensysException: Base Exception Class for the Censys API.
"""
warnings.warn(
"CensysSearchAPIv1 will be deprecated soon. "
"Please migrate to the new Censys Platform API. "
"Visit https://docs.censys.com/reference/get-started#/ for documentation "
"and install the new SDK with: pip install censys-platform "
"(https://pypi.org/project/censys-platform/)",
category=DeprecationWarning,
stacklevel=2,
)

CensysAPIBase.__init__(self, kwargs.pop("url", self.DEFAULT_URL), **kwargs)

# Gets config file
Expand Down
11 changes: 11 additions & 0 deletions censys/search/v2/api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Base for interacting with the Censys Search API."""

import os
import warnings
from concurrent.futures import ThreadPoolExecutor, as_completed
from typing import Any, Dict, Iterable, Iterator, List, Optional, Type, Union

Expand Down Expand Up @@ -44,6 +45,16 @@ def __init__(
Raises:
CensysException: Base Exception Class for the Censys API.
"""
warnings.warn(
"CensysSearchAPIv2 will be deprecated soon. "
"Please migrate to the new Censys Platform API. "
"Visit https://docs.censys.com/reference/get-started#/ for documentation "
"and install the new SDK with: pip install censys-platform "
"(https://pypi.org/project/censys-platform/)",
category=DeprecationWarning,
stacklevel=2,
)

CensysAPIBase.__init__(self, kwargs.pop("url", self.DEFAULT_URL), **kwargs)

# Gets config file
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "censys"
version = "2.2.17"
version = "2.2.18"
description = "An easy-to-use and lightweight API wrapper for Censys APIs (censys.io)."
authors = ["Censys, Inc. <support@censys.io>"]
license = "Apache-2.0"
Expand Down