Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
.. image:: https://img.shields.io/pypi/v/bonsai.svg?style=flat-square :target: https://pypi.python.org/pypi/bonsai/ :alt: PyPI Version
.. image:: https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fnoirello%2Fbonsai%2Fbadge%3Fref%3Ddev&style=flat-square :target: https://actions-badge.atrox.dev/noirello/bonsai/goto?ref=dev :alt: GitHub Action Build Status
.. image:: https://dev.azure.com/noirello/bonsai/_apis/build/status/noirello.bonsai?branchName=dev :target: https://dev.azure.com/noirello/bonsai/_build :alt: Azure Pipelines Status
.. image:: https://img.shields.io/appveyor/ci/noirello/bonsai/dev.svg?style=flat-square :target: https://ci.appveyor.com/project/noirello/bonsai :alt: AppVeyor CI Build Status
.. image:: https://codecov.io/gh/noirello/bonsai/branch/dev/graph/badge.svg?token=gPAMdWATgj :target: https://app.codecov.io/gh/noirello/bonsai/tree/dev/src :alt: Coverage Status
.. image:: https://readthedocs.org/projects/bonsai/badge/?version=latest&style=flat-square :target: http://bonsai.readthedocs.org/en/latest/ :alt: Documentation Status
.. image:: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square :target: https://raw.githubusercontent.com/noirello/bonsai/master/LICENSE :alt: GitHub License
This is a module for handling LDAP operations in Python. Uses libldap2 on Unix platforms and WinLDAP on Microsoft Windows. LDAP entries are mapped to a special Python case-insensitive dictionary, tracking the changes of the dictionary to modify the entry on the server easily.
Supports only Python 3.7 or newer, and LDAPv3.
Documentation is available online
_ with a simple tutorial.
Simple search and modify:
.. code:: python
import bonsai
client = bonsai.LDAPClient("ldap://localhost")
client.set_credentials("SIMPLE", user="cn=admin,dc=bonsai,dc=test", password="secret")
with client.connect() as conn:
res = conn.search("ou=nerdherd,dc=bonsai,dc=test", 2, "(cn=chuck)")
res[0]['givenname'] = "Charles"
res[0]['sn'] = "Carmichael"
res[0].modify()
Using with asyncio:
.. code:: python3
import asyncio
import bonsai
async def do():
client = bonsai.LDAPClient("ldap://localhost")
client.set_credentials("DIGEST-MD5", user="admin", password="secret")
async with client.connect(is_async=True) as conn:
res = await conn.search("ou=nerdherd,dc=bonsai,dc=test", 2)
print(res)
who = await conn.whoami()
print(who)
asyncio.run(do())
The changelog is available here
_ and included in the documentation as well.
Any contributions and advices are welcome. Please report any issues at
the GitHub page
_.
.. _online: http://bonsai.readthedocs.org/en/latest/ .. _here: https://github.com/noirello/bonsai/blob/master/CHANGELOG.rst .. _GitHub page: https://github.com/noirello/bonsai/issues
FAQs
Python 3 module for accessing LDAP directory servers.
We found that bonsai 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.