Skip to main content

Membership management for UNOB

Project description

Membership_UNOB_ws

Repository for school web scraping project of unob IS

Task

3. Naplnění dat o členství

Využijte zdroje dat pro získání informací o členství osob ve skupinách (GQL_UG). Vytvořte JSON datovou strukturu (kompatibilní se systemdata.json). Vytvořte program, který importuje data do GQL endpointů (s využitím mutací). Zabezpečte existenci propojení (ExternalIDs) se zdrojovým IS.

Společné podmínky

Testujte duplicitu dat, jednak přes externalid a jednak, kde je to možné, přes jména či jiné identifikátory.

Pro práci s html daty (získání html stránek) použijte knihovnu selenium (headless mode).

Vytvořte a publikujte pypi package. Součastí github respository (source for package) je i ipynb notebook s demonstrací využití (import package, run main code). Nechť je možné importovat funkci gather z root balíčku (pypi package).

Hlavní funkce gather() pracuje s následujícími parametry:

- username: Přihlašovací jméno

- password: Přihlašovací heslo

- config: {paths: {users: “”, groups: “”, memberships: “”. … }} (defaultni hodnota)

- output (systemdata.json, writetogql)

- **extras (token!)

U entit naplňte všechny atributy, pokud ve zdroji některé atributy nejsou, domluvte se na jejich dummy values.

Pokud máte u entit k dispozici atributy navíc, navrhněte rozšíření GQL endpointu.

JSON requirements

Before you run main.py please create "credentials.json" with this format:

{
  "username": "your unob email",
  "password": "your password"
}

Initialization process:

You can directly install the package using this command:

For version 2.0.1:

pip install membershipUNOB

Source : https://pypi.org/project/membershipUNOB/

Using it for your project:

We already published our project as a Pypi package so in file 'requirement.txt' you just need to add "membershipUNOB", it will automatically install all the libraries and dependencies.

Move on to the next step, please create main.py file and in this file please import "membershipUNOB" just like code below:
image

Once you have done all these steps, all you have to do is run the main.py flle and after that a "config.ini" file will pop up just like this.
image

In 'config.ini' You can adjust the data retrieval from the website of the university or import data, which you scrape, into the GQL endpoint, depending on how you want

Config.ini explanation: true/false - keep in mind that default value for all config are true

Webscraping and extract data

  1. get_data : execute webscraping to update the current data for changes
  2. extract_data : from users and groups data extract them to get memberships and externalids data

Data import

  1. users : execute users import to GQL endpoint
  2. groups : execute groups import to GQL endpoint
  3. memberships : execute memberships import to GQL endpoint

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

membershipunob-2.0.1.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

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

membershipUNOB-2.0.1-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file membershipunob-2.0.1.tar.gz.

File metadata

  • Download URL: membershipunob-2.0.1.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for membershipunob-2.0.1.tar.gz
Algorithm Hash digest
SHA256 bf14bf117d042d83134c31bf9a65287e6e4c3b7b3e02b901480328d003331b72
MD5 61d8ee7088952eee8c950ce934f108fb
BLAKE2b-256 99cc40a792cb375f99f1607972fb2baa732f0dc261a1f26bae0abbdb88bdfb5b

See more details on using hashes here.

File details

Details for the file membershipUNOB-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: membershipUNOB-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for membershipUNOB-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 55091fb98cb691acd64edb72e6c80a5c32b06260686c429ab36cb6ede1eda3b2
MD5 d0bbac11ec8ea7df88fbfc6ebfe81f39
BLAKE2b-256 4fe0eaf35299cee8ec0ca76e72fa0a96a8a788c247cbdb17acd001e31fbfc616

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