epflldap
Installation
pip install dist/epflldap-<version>-py3-none-any.whl
Build new version
- Makes changes
- Change the version in
_version.py python setup.py bdist_wheel
Basic usages
1. Get and save locally the data of EPFL Ldap
import epflldap
data = epflldap.db()
data.to_pickle()
This will create locally a ldap_epfl.pickle file.
To load the local data:
import epflldap
data = epflldap.db(read_from_pickle=True)
2. Get users data only
import epflldap
users = epflldap.db(read_from_pickle=True).get_users()
You will get a Users object.
3. Filter users data
Filter by group
import epflldap
users = epflldap.db(read_from_pickle=True).get_users()
users_filtered = users.filter_by_group('webmasters')
You will get an other Users object with only the filtered data. Available
groups are here: https://groups.epfl.ch/
Filter by status
import epflldap
users = epflldap.db(read_from_pickle=True).get_users()
users_filtered = users.filter_by_status(['Personnel'])
Possible status are:
PersonnelEtudiantHôteHors EPFL
Several entries don't have a status.
Filter by unit
import epflldap
users = epflldap.db(read_from_pickle=True).get_users()
users_filtered = users.filter_by_unit('SISB')
You will get all the users from the SISB team.
Filter by school
import epflldap
users = epflldap.db(read_from_pickle=True).get_users()
users_filtered = users.filter_by_school('CDH')
You will get all the users from the CDH school.
Filter by sciper
import epflldap
users = epflldap.db(read_from_pickle=True).get_users()
users_filtered = users.filter_by_sciper(['sciper1', 'sciper2'])
Filter the list of users with the given list of sciper id.
In order to get information about a specific user you can:
import epflldap
epflldap.db(read_from_pickle=True)
.get_users()
.filter_by_sciper(['sciper1'])
.data[0]
.get_info()
You will get a Pandas Series with information about the person with the given sciper.
Keep only first accred
import epflldap
users = epflldap.db(read_from_pickle=True).get_users()
users_filtered = users.filter_by_first_accred()
You will get only the main accreditation of each user.
4. Get all the email addresses of a Users object
import epflldap
users = epflldap.db(read_from_pickle=True).get_users()
users_filtered = users.filter_by_group('webmasters')
users_filtered.get_emails()
You will get all the email addresses of the group 'webmaster'. If you want a txt file, you can add an argument:
users.get_emails(output='addresses.txt')
5. Get Excel file with personal information data
import epflldap
users = epflldap.db(read_from_pickle=True).get_users()
users_filtered = users.filter_by_group('webmasters')
users_filtered.to_excel(webmasters.xlsx)
This will create a xlsx file with personal information about the users.
Metadata
Release files for epflldap 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| epflldap-0.4.1.tar.gz | 6.5 kB | Without provenance | Details for epflldap-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| epflldap-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for epflldap-0.4.1-py3-none-any.whl |
Total release size: 14.7 kB
Release files / epflldap-0.4.1.tar.gz
| Download URL | epflldap-0.4.1.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16a5808f5ce2babfb593228a15aaaaf0b47e2ff10b20bc23790b8ada1be89d09
|
|
BLAKE2b-256 checksum How to use checksums |
746455a845240b2c1dad0cc30b3eb297f47b9764cefcd372f3db69ab73a6a103
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Release files / epflldap-0.4.1-py3-none-any.whl
| Download URL | epflldap-0.4.1-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6727c47a03b0585b93301f8d9a098f69679b653cf8481504eb9e7557c7227839
|
|
BLAKE2b-256 checksum How to use checksums |
d5fdd61d93d9889cbc1a32b890654146625bef5f4b868b74e0577638ebb1128c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Security for epflldap 0.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.