Skip to main content

PyPI

Python package to search for basic university information. This packages obtains information from Hipo/university-domains-list’s database. It is fully compatible with Python 2.6 and up.

Installation

Your preference should be to use PyPi: pip install universities

Source and wheel distributions are available in the releases tab as well.

Usage

import universities

uni = universities.API() # can specify encoding for use in Python 2

canadian = uni.search(country = "Canada")
only_mit = uni.search(domain = "mit.edu")
all_data = uni.get_all()
waterloo = uni.lucky(name = "Waterloo") # As in "I'm feeling lucky"

Available Functions

  • universities.search searches the entire database for universities matching the specified critera. You may filter by name, domain or country as arguments to search. This returns a list of universities.models.University objects.

  • universities.lucky is an alias for search which only returns the first result of the search. All the same parameters are available, and a single universities.models.University is returned.

  • universities.get_all returns all of the entries in the database, in the same format as search. In fact, this is simply an alias for search that uses no arguments.

Any query which reurns multiple objects will return a Generator.

Models

  • universities.models.University is the basic model returned in all requests. It contains six fields:

    • name: The name of the university.

    • domains: A list of domain names the university uses (for emails, etc).

    • web_pages: A list of web pages associated with the university.

    • country_code: The two-letter ISO-3166 country code where the university is located.

    • stateprov: The state or province the university is located. This is usually not populated.

    • country: The full country name where the university is located.

Requirements

The only requirement is requests.

Development

  1. Clone/fork the git repository.

  2. cd to the directory and install the requirements if necessary: pip install -r requirements.txt

  3. Edit to your heart’s content!

  4. If you wish to contribute, push your changes to GitHub on your own fork and make a pull request.

Note: Any contributions should be made following the PEP8 standard.

Release files for universities 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for universities 1.1.0
File Size Uploaded
universities-1.1.0.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for universities 1.1.0
File Interpreter ABI Platform
universities-1.1.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 10.6 kB

Release files / universities-1.1.0.tar.gz

Download URL universities-1.1.0.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d15fc4d406f38ca752190c983c74b6b60be967af8b7ea2011f02e499f7552138
BLAKE2b-256 checksum
How to use checksums
21416460b9e27d3474f53503a7b46571c2ad8b44ad863df9788749e63eb5a0ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.0 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.2

Release files / universities-1.1.0-py2.py3-none-any.whl

Download URL universities-1.1.0-py2.py3-none-any.whl
Size 5.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e8a9e78b5390647d96b8f0b8008551b6b2dad30ed5244ae28eba6a9c8edbe199
BLAKE2b-256 checksum
How to use checksums
dae6791f47d4ae71e6174322769e02b44a5c681c2521124572c50d77d6a648e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.0 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.2

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page