durham-directory-1.3.0
توضیحات
Python Bindings for the Durham University (UK) Directory
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | durham-directory-1.3.0 |
| نام | durham-directory |
| نسخه کتابخانه | 1.3.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | John Maximilian |
| ایمیل نویسنده | 2e0byo@gmail.com |
| آدرس صفحه اصلی | https://github.com/2e0byo/durham-directory |
| آدرس اینترنتی | https://pypi.org/project/durham-directory/ |
| مجوز | MIT |
# Python bindings for the Durham University (UK) Directory
This package provides basic python bindings for [the Durham University
Directory](https://dur.ac.uk/directory/password), 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
```bash
python -m pip install durham-directory
```
## CLI Usage
```bash
durham-directory --help
durham-directory --oname John --surname Morris
```
## API Usage
```python
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:
```python
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.
## Scripts
An example script parsing a csv extracted from the spreadsheets it seems
timetabling send around and printing Org-mode tables is in `parse_csv.py`.
نیازمندی
| مقدار | نام |
|---|---|
| >=2.26.0,<3.0.0 | requests |
| >=0.0.1,<0.0.2 | bs4 |
| >=4.6.3,<5.0.0 | lxml |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.9,<4.0 | Python |
نحوه نصب
نصب پکیج whl durham-directory-1.3.0:
pip install durham-directory-1.3.0.whl
نصب پکیج tar.gz durham-directory-1.3.0:
pip install durham-directory-1.3.0.tar.gz