Skip to main content

Python Bindings for the Durham University (UK) Directory

Project description

Python bindings for the Durham University (UK) Directory

This package provides basic python bindings for the Durham University Directory, where Durham University students and staff can look up fellow students and staff.

It is nothing more than a wrapper around requests and bs4, and absolutely nothing clever is being done (although I do think the code is pleasantly simple).

Installation

python -m pip install durham-directory

CLI Usage

durham-directory --help
durham-directory --oname John --surname Morris

API Usage

from durham_directory import Query
query = Query(username="me") # will prompt for password when evaluated
query(oname="John", surname="Morris", type_="any")

Or if you want to choose one result:

from durham_directory import QueryOne
query = QueryOne()
query(oname="John", surname="Morris", type_="any")

We use fuzzy string matching via fuzzywuzzy (ignoring the title) to sort results, as Durham appears to return them bogosorted.

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

durham-directory-1.2.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

durham_directory-1.2.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file durham-directory-1.2.0.tar.gz.

File metadata

  • Download URL: durham-directory-1.2.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.10 CPython/3.9.7 Linux/5.14.10-arch1-1

File hashes

Hashes for durham-directory-1.2.0.tar.gz
Algorithm Hash digest
SHA256 be25fb78fd4092d609786fa0496d508e11f42bf5b42462f68053ee7996fad21a
MD5 61bdb206295e2787c658f77aedcf093c
BLAKE2b-256 568288f2fb1d249a4a324519e21f27619fdf15f5bfcfb9544fec2d86cd0ce70e

See more details on using hashes here.

File details

Details for the file durham_directory-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: durham_directory-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.10 CPython/3.9.7 Linux/5.14.10-arch1-1

File hashes

Hashes for durham_directory-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe9ba6569ed4e2f3896c56aa0d038044ac7159f7a167764524d9954ab8c595f3
MD5 300ddbc6199486033b7adc7d33a85769
BLAKE2b-256 145424726612b711733631d8985ac913dc7a03e86e8878a6a6ad74d529bc704f

See more details on using hashes here.

Supported by

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