semvec/pypi-packages huggingface dataset:
SkSchedule 0.0.2
为生科查课提供便利
License: MIT

---
title: SkSchedule文档
---

[TOC]



# 介绍

`SkSchedule`用于湖北生物科技职业学院的查课,使用python进行封装,一定程度上降低了开发者的工作量。

# 开始使用



## 安装模块以及依赖包

```python
pip install SkSchedule 
pip install pandas
pip install requests
```



## 导入模块

```python
from SkSchedule.course import Course
```



## Course

`Course`是唯一的一个主类,实例化时接受三个参数:`username`,`password`,`weeks`。

`username`:学号,字符型,必选参数

`password`:密码,字符型,必选参数

`weeks`:周次,整数型,默认为2,即查询第二周的课表,非必选参数

例如，

```python
from SkSchedule.course import Course
Course('1905080101','1905080101a')
```



### fetch

`fetch`:`Course`类的方法,用于获取一周的课表数据。

```python
from SkSchedule.course import Course
course = Course('1905080101','1905080101a')
data = course.fetch()
print(data)
```



### query

`query`:`Course`类的方法,用于查询单条或者多条数据,它接受两个参数,`week`,`teacher`。

`week`:星期,`str`类型或者`list`类型,可选的值为:

`['周一','周二','周三','周四','周五','周六','周日']`

当给定`week`参数类型为`str`时候,则查询单条,类型为`list`时候查询多条数据

`teacher`:教师姓名,`str`类型

如，查询周一课表:

```
query('周一')
```

组合查询

```
#查询周一并且是教师为孙智武老师的课程
query('周一','孙智武')
```

查询多条数据

```
#查询周一和周三的课程
query(['周一','周三'])
```

### to_excel

`to_excel`:`Course`类的方法,用于导出数据为excel文件,它接受一个参数`path`

`path`:文件保存路径

```
from SkSchedule.course import Course
course = Course('1905080101','1905080101a')
course.to_excel('课程表.xlsx')
```



# 常见问题

1.当`Course`中的`username`和`password`给定有误或者学校教务系统无此信息的时候，会抛出`ValueError`:参数错误。

文档待完善,具体问题请联系开发者:2528104776@qq.com
tuya-connector-python 0.1.2
The `tuya-connector-python` SDK is desinged to support open APIs and Pulsar Messages provided by Tuya.
License: MIT
Requires Python: >=3.0
Keywords: tuya iot cloud sdk python

# tuya-connector-python

![PyPI](https://img.shields.io/pypi/v/tuya-connector-python)

![PyPI - Downloads](https://img.shields.io/pypi/dm/tuya-connector-python)

![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tuya-connector-python)

The `tuya-connector-python` SDK is designed to support openAPIs and Pulsar messages provided by Tuya. Before using this SDK, you can see [Quick Start](https://developer.tuya.com/en/docs/iot/quick-start1?id=K95ztz9u9t89n) on the Tuya Developer website to learn more about Cloud Development Platform.

## Install

`pip3 install tuya-connector-python`

## Get started

1. [Sign up](https://auth.tuya.com/register?from=https%3A%2F%2Fiot.tuya.com%2F) for Tuya developer account.

2. [Create a cloud project](https://iot.tuya.com/cloud/). See the [tutorial](https://developer.tuya.com/en/docs/iot/device-control-practice?id=Kat1jdeul4uf8) for how to get the authorization key and other necessary parameters.

3. A quick example is as follows:

   ``` python
   from tuya_connector import (
   	TuyaOpenAPI,
   	TuyaOpenPulsar,
   	TuyaCloudPulsarTopic,
   )
   
   ACCESS_ID = "your-access-id"
   ACCESS_KEY = "your-access-key"
   API_ENDPOINT = "https://openapi.tuyacn.com"
   MQ_ENDPOINT = "wss://mqe.tuyacn.com:8285/"
   
   # Init OpenAPI and connect
   openapi = TuyaOpenAPI(API_ENDPOINT, ACCESS_ID, ACCESS_KEY)
   openapi.connect()
   
   # Call any API from Tuya
   response = openapi.get("/v1.0/statistics-datas-survey", dict())
   
   # Init Message Queue
   open_pulsar = TuyaOpenPulsar(
   	ACCESS_ID, ACCESS_KEY, MQ_ENDPOINT, TuyaCloudPulsarTopic.PROD
   )
   # Add Message Queue listener
   open_pulsar.add_message_listener(lambda msg: print(f"---\nexample receive: {msg}"))
   
   # Start Message Queue
   open_pulsar.start()
   
   input()
   # Stop Message Queue
   open_pulsar.stop()
   ```

## OpenAPI reference

Tuya opens up a variety of APIs covering scenarios such as device pairing, asset management, and device control. You can call APIs according to [API reference](https://developer.tuya.com/en/docs/cloud/?_source=github) to create IoT applications.

## Feedback

If you have any questions, please provide feedback via **Github Issue** or [Technical Ticket](https://service.console.tuya.com/).

## License

The `tuya-connector-python` SDK is available under the MIT license. For more information, see the [LICENSE](./LICENSE) file.
ScratchEncoder 0.1.6
Scratch Encoder
License: MIT
Requires Python: >=3.6

# ScratchEncoder

## Installation

```bash
pip install ScratchEncoder
```

## Usage

```python
encoder = scratchencoder.Encoder()
```

Initializes a new encoder object.

## Encoding

```python
encoder.encode('Text')
# Encodes text and returns the encoded value
encoder.decode('value')
# Decodes a value and returns the decoded text
```

## Scratch

View the project on scratch [here](https://scratch.mit.edu/projects/546443308)
Contact me on my [Scratch Profile](https://scratch.mit.edu/users/TheCloudDev/#comments)