Python Deprecation Dates
A Python library to fetch and display Python version deprecation dates using data from the endoflife.date API.
Features:
- Fetch Python version end-of-life dates
- Get the latest Python version
- Support for custom request settings, including proxies and headers
Installation:
Install the library using pip:
pip install python-deprecation-dates
Usage:
from python_deprecation_dates import PythonEOLAPI
Create an API client
api_client = PythonEOLAPI()
Get all deprecation dates
deprecation_dates = api_client.get_deprecation_dates()
print(deprecation_dates)
Get the latest Python version
latest_version = api_client.get_latest_version()
print(f"The latest Python version is: {latest_version}")
Setting Proxies:
You can configure proxies using the request_settings parameter:
from python_deprecation_dates import PythonEOLAPI
# Define proxy settings
request_settings = {
"proxies": {
"http": "http://proxy.example.com:8080",
"https": "http://proxy.example.com:8080"
}
}
# Create an API client with proxy settings
api_client = PythonEOLAPI(request_settings=request_settings)
# Fetch deprecation dates through the proxy
deprecation_dates = api_client.get_deprecation_dates()
print(deprecation_dates)
Custom Headers:
Add custom headers for requests:
from python_deprecation_dates import PythonEOLAPI
# Define request settings with headers
request_settings = {
"headers": {
"User-Agent": "python-deprecation-dates/1.0"
}
}
# Create an API client with custom headers
api_client = PythonEOLAPI(request_settings=request_settings)
# Fetch deprecation dates with custom headers
deprecation_dates = api_client.get_deprecation_dates()
print(deprecation_dates)
Contributing:
Contributions are welcome! Please follow the contribution guidelines and ensure tests pass before submitting a pull request.
License:
This library is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for python-deprecation-dates 0.2.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python-deprecation-dates-0.2.6.tar.gz | 3.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_deprecation_dates-0.2.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.7 kB
Release files / python-deprecation-dates-0.2.6.tar.gz
| Download URL | python-deprecation-dates-0.2.6.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9094f9d4d3bacd7ac5f7489cfee3c14b01846dbc4f2f6e5686ed7d3626ddd928
|
|
BLAKE2b-256 checksum How to use checksums |
a2574cc8270c46440312e7d4443854a7f4cb2ac83a95f2c2f89c08221eb1abe0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.8.18
|
Release files / python_deprecation_dates-0.2.6-py3-none-any.whl
| Download URL | python_deprecation_dates-0.2.6-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
56b09357d16bc5ff2a0f742494f5b84dec8d695b137e8fda26622268602e6e66
|
|
BLAKE2b-256 checksum How to use checksums |
bafcacb32d22418af7cca707bf562d802b9c6a0a7560964d52c1b504e27a32e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.8.18
|