Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
.. ssladapter:
SSL Adapter is a Python package that provides utilities for handling SSL connections and creating sessions with SSL adapters.
Install using pip:
.. code-block:: bash
pip install ssladapter
Creating a Session with SSL Adapter
To create a session with an SSL adapter, you can use the ``session_ssl_adapter`` function provided by the package.
.. code-block:: python
from ssladapter.entry import session_ssl_adapter
# Create a session with SSL adapter
session = session_ssl_adapter(
certfile='/path/to/client_certificate.pem',
keyfile='/path/to/client_private_key.pem',
password='your_password', # Optional
cacertfile='/path/to/ca_certificate.pem' # Optional
)
# Use the session for making requests
response = session.get('https://example.com/api')
Creating an SSL Adapter
~~~~~~~~~~~~~~~~~~~~~~~~
Alternatively, you can directly create an instance of the ``SSLAdapter`` class and use it to customize a session with SSL configuration.
.. code-block:: python
from ssladapter.ssl_adapter import SSLAdapter
from requests import Session
# Create an SSL adapter instance
ssl_adapter = SSLAdapter(
certfile='/path/to/client_certificate.pem',
keyfile='/path/to/client_private_key.pem',
password='your_password', # Optional
cacertfile='/path/to/ca_certificate.pem' # Optional
)
# Create a session and mount the SSL adapter
session = Session()
session.mount('https://', ssl_adapter)
# Use the session for making requests
response = session.get('https://example.com/api')
FAQs
SSL Adapter for requests library
We found that ssladapter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.