Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dipernalz committed Jul 18, 2021
0 parents commit 6ac62bf
Show file tree
Hide file tree
Showing 5 changed files with 502 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Leo DiPerna

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# vt-timetable

A python module for scraping the Virginia Tech Timetable of Classes.

This module makes it easy to get data from the Virginia Tech Timetable of
Classes using python. The most important components of the module are the
`search_timetable` function, which directly searches the timetable with the
provided parameters, and the `Course` class, which contains data about a
course. `search_timetable` returns a list of Course classes. Additionally,
`get_crn` makes it easier to search for a specific course and `get_subjects`
makes it easy to get a list of all the course subjects in the timetable.

[Documentation can be found here.](https://leodiperna.com/projects/vt-timetable/documentation)

## Getting started

This module can be installed from the Python Package Index.

```console
pip install vt-timetable
```

After installing the module, it can be imported with:

```python
import vtt
```

## Usage

This module comes with several Enumeration classes that are used as search
parameters for `search_timetable` and/or are returned by the getter functions
in `Course`. More information about the getter functions can be found in the
[documentation](https://leodiperna.com/projects/vt-timetable/documentation).

### Examples

Getting a set of all the subjects in the timetable:

```python
get_subjects()
```

Getting data about CRN 83075 for Fall 2021, and checking if there are any open
spots:

```python
get_crn('2021', Semester.FALL, '83075').has_open_spots()
```

Getting a list of all MATH 2114 for Fall 2021 that are taking place in person:

```python
search_timetable('2021', Semester.FALL, subject='MATH', code='2114',
modality=Modality.IN_PERSON)
```
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build-system]
requires = [
"setuptools",
"wheel",
]
build-backend = "setuptools.build_meta"
28 changes: 28 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[metadata]
name = vt-timetable
version = 0.1.0.dev1
author = Leo DiPerna
author_email = [email protected]
description = A module for scraping the Virginia Tech Timetable of Classes.
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/dipernalz/vt-timetable
project_urls =
Source = https://github.com/dipernalz/vt-timetable
classifiers =
Programming Language :: Python :: 3
License :: OSI Approved :: MIT License
Operating System :: OS Independent

[options]
package_dir =
= src
packages = find:
python_requires = >=3.4
install_requires =
lxml
requests
pandas

[options.packages.find]
where = src
Loading

0 comments on commit 6ac62bf

Please sign in to comment.