semvec/pypi-packages huggingface dataset:
bushk 0.0.2
取得香港巴士的數據!
License: MIT
Requires Python: >=3.10

# Quickstart

> What does `bushk` do?
> - [Get data of the bus stop in Hong Kong](#get-data-of-the-bus-stop)
> - [Get data of route in Hong Kong](#get-data-of-the-route)
> - [Get ETA of bus in Hong Kong](#check-eta-of-bus)

**Install `bushk`**
```shell
pip install bushk
```

## Get data of the bus stop

> How can I get data of the bus stop?
> 1. [Copy or reference code](#example-code)
> 2. [Run your Python file](#get-data-of-the-bus-stop)

### Example Code
```py
import bushk


@bushk.runner
async def _stop():
	stop=await bushk.Stops.get("ID OF STOP")
	print(f"{stop.id}: {stop.name['en']}")
```

## Get data of the route

> How can I get data of the bus stop?
> 1. [Copy or reference code](#example-code-1)
> 2. [Run your Python file](#get-stop-of-bus)

### Example Code
```py
import bushk


@bushk.runner
async def _route():
	route=await bushk.Routes.get("NUMBER OF THE ROUTE", "direction OF THE ROUTE(O, I, OUTBOUND, INBOUND, OB OR IB)(OPTIONAL)", "SERVICE TYPE OF THE ROUTE(1 OR 2)(OPTIONAL)")
	print(f"Route: {route.route}\nNormal: {route.normal}\nBound: {route.bound}")
```

## Check ETA of Bus

> How can I get ETA of bus?
> 1. [Copy or reference code](#example-code-2)
> 2. [Run your Python file](#check-eta-of-bus)

### Example Code
```py
import bushk


@bushk.runner
async def _eta():
	route=await bushk.Routes.get("NUMBER OF ROUTE WHICH YOU WANT TO CHECK THE ETA OF THE BUS")
	for eta in await bushk.ETA.get_route(route):
		print(f"{bushk.Stops.get(route.stops_id[eta.seq]).name['en']}: {eta.arrive_at}({eta.rmk})")
```
timeoff 0.0.6
Track vacation hours accrued.
License: MIT
Requires Python: >=3.8
Keywords: time off,vacation,pto

# timeoff 🏝

[![pypi](https://img.shields.io/pypi/v/timeoff.svg)](https://pypi.python.org/pypi/timeoff) [![license](https://img.shields.io/pypi/l/timeoff.svg)](https://pypi.python.org/pypi/timeoff) [![python](https://img.shields.io/pypi/pyversions/timeoff.svg)](https://pypi.python.org/pypi/timeoff) [![ci](https://github.com/tifa/timeoff/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/tifa/timeoff/actions/workflows/ci.yml)

Track your hours accrued and set goals and reminders to take a break!

```console
$ timeoff list

  |    o               ,---.,---.
  |--- .,-.-.,---.,---.|__. |__.
  |    || | ||---'|   ||    |
  `---'`` ' '`---'`---'`    `

  Current schedule: SemiMonthly
                    4 hours on the 1st and 15th of the month
╭────────────┬───────┬──────────┬─────────┬─────────────╮
│   Start    │  End  │   Type   │   Hours │   Remaining │
├────────────┼───────┼──────────┼─────────┼─────────────┤
│            │       │ Initial  │     100 │         100 │
│ 2023-05-12 │   -   │ Vacation │      -8 │          92 │
│ 2023-05-15 │   -   │ Accrued  │       4 │          96 │
╰────────────┴───────┴──────────┴─────────┴─────────────╯
```

## Features

- Automaticaly updates PTO hours over time.
- Define schedules to set accrued PTO rates.
- View the remaining hours of PTO available to you.

## Installation

To install ``timeoff``:

```console
$ pip install timeoff
```

## Usage

Documentation is in the works! Please run the `-h` help flag in the meantime. The interactive prompts will guide you through further instructions.

```console
$ timeoff -h
usage: timeoff [-h] {add,list,rm,settings} ...

Timeoff CLI

positional arguments:
  {add,list,rm,settings}
                        sub-command help
    add                 Add an absence
    list                List absences
    rm                  Remove an absence
    settings            Manage settings

optional arguments:
  -h, --help            show this help message and exit
```

The data is stored in `~/.timeoff`.

### Python API

You can also use this as a Python library.

Retrieve a list of all PTO hours remaining and absenses taken.

```python
import timeoff
timeoff.get()
```

Return the number of hours of PTO remaining as of today.

```python
timeoff.available_hours()
```

You can also pass in a future date to see how many hours you'll have accumulated by then.

```python
from datetime import date
timeoff.available_hours(date(2023, 9, 4))
```