Skip to main content

Format lists of users by querying LDAP

Project description

CI Coverage PyPI License

dls_ldap_query

Overview

Create formatted lists of users by querying LDAP

A DLS Internal tool.

Links

Source https://github.com/DiamondLightSource/dls-ldap-query
PyPI pip install dls-ldap-query
Docker docker run ghcr.io/diamondlightsource/dls-ldap-query:latest
Releases https://github.com/DiamondLightSource/dls-ldap-query/releases

Temporary deployment

This will be deployed as an environment module. But for the moment you can access it at DLS using this path:

/dls_sw/work/python3/dls-ldap-query --help

Example Usage

Get the email addresses of everyone in group dcs

dls-ldap-query --group dcs

Get the fedids of all the users in GitHub Members. (this requires access to the github-members GitLab repository)

dls-ldap-query --repo --output fedid

Get the fedids of all the users in Diamond Beamline Controls Outlook distribution list.

  • Click New Email in outlook and start typing the DL name, hit enter once the correct DL is highlighted
  • Click on the + to the left of the DL name - this expands it into its members
  • Ctrl-A Ctrl-C (select all names and copy to clipboard)
  • paste these names into a file e.g. /tmp/names.txt and save it
dls-ldap-query --email --file /tmp/names.txt
# OR
dls-ldap-query --email '"Knap, Giles (DLSLtd,RAL,LSCI)" <giles.knap@diamond.ac.uk>; "Cob ... '

NOTE: you can paste the email members directly to the command line but you must enclose them in single quotes and remove any apostrophes in names! (which is why the file approach is easier)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dls_ldap_query-0.5.2.tar.gz (76.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dls_ldap_query-0.5.2-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file dls_ldap_query-0.5.2.tar.gz.

File metadata

  • Download URL: dls_ldap_query-0.5.2.tar.gz
  • Upload date:
  • Size: 76.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dls_ldap_query-0.5.2.tar.gz
Algorithm Hash digest
SHA256 10d9787e93a12f37c695859beeec643ce643aab95d291ba3f3fddcbaef8ba0a4
MD5 2a92f0921f634da0c7d10300227ae1db
BLAKE2b-256 bed3bf458005601a77fe3f57ace203dfc1f4a1b725657fa757e581e266a425e1

See more details on using hashes here.

File details

Details for the file dls_ldap_query-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: dls_ldap_query-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dls_ldap_query-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 80d0bd5af03921783163e30dbb9ba28a8c2651b39de9871c3656348ea420e364
MD5 05e42fda2ecab6d74abe4316ee60759a
BLAKE2b-256 cce0b61036c8fe0e4177a2d30fbec9ac8c53886b906f6875179a0bbd9d035309

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page