A Python library to interact with the Luogu online judge system
Project description
luogu-api-python
A Python implementation of the Luogu API
Project Description
luogu-api-python is a Python library that provides an interface to interact with the Luogu online judge system. It allows users to programmatically manage problems, and user operations on Luogu. This library aims to simplify the process of automating tasks on Luogu by providing easy-to-use methods and classes.
Upstream docs: https://github.com/sjx233/luogu-api-docs
Installation
To install the package, use pip:
$ pip3 install luogu-api-python
To install the package from source, follow these steps:
-
Clone the repository:
$ git clone https://github.com/NekoOS-Group/luogu-api-python.git $ cd luogu-api-python
-
Install the package:
$ python3 -m pip install .
Usage
Here is an example of how to use the package:
import pyLuogu
# Initialize the API without cookies
luogu = pyLuogu.luoguAPI()
# Get a list of problems
problems = luogu.get_problem_list().problems
for problem in problems:
print(problem.title)
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
Pull Request
- Fork the repository on GitHub.
- Clone your forked repository to your local machine:
$ git clone https://github.com/your-username/luogu-api-python.git $ cd luogu-api-python
- Create a new branch for your feature or bugfix:
$ git checkout -b feature-or-bugfix-name
- Make your changes and commit them with a descriptive commit message:
$ git add . $ git commit -m "Description of your changes"
- Push your changes to your forked repository:
$ git push origin feature-or-bugfix-name
- Open a pull request on the original repository and provide a detailed description of your changes.
Reporting Issues
If you find a bug or have a feature request, please open an issue on GitHub. Provide as much detail as possible to help us understand and address the issue.
Todo List
Methods of class LuoguAPI
- Problem
- get_problem_list
- get_team_problem_list
- get_problem
- get_problem_settings
- update_problem_settings
- update_testcases_settings
- create_problem
- delete_problem
- transfer_problem
- download_testcases
- upload_testcases
- User
- get_user
- get_user_info
- get_user_followings_list
- get_user_followers_list
- get_user_blacklist
- search_user
- UserOperation
- login
- logout
- me
- submit_code
- get_created_problem_list
- get_created_problemset_list
- get_created_content_list
- update_setting
- Miscs
- get_tags
- get_captcha
- sign_up
Others
- asyncLuoguAPI
- staticLuoguAPI
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file luogu_api_python-0.0.2rc0.tar.gz.
File metadata
- Download URL: luogu_api_python-0.0.2rc0.tar.gz
- Upload date:
- Size: 54.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4f7d5ed8f55c419b4bc9a00fa6f9ff459b362ff8c97456191a1d00c295d8474
|
|
| MD5 |
1a5a64f241812eb04f20964adc7da42b
|
|
| BLAKE2b-256 |
7ac2aafd78138c481dbfc7b089ece84976f094c16e035d6e263476ec4b99b387
|
File details
Details for the file luogu_api_python-0.0.2rc0-py3-none-any.whl.
File metadata
- Download URL: luogu_api_python-0.0.2rc0-py3-none-any.whl
- Upload date:
- Size: 45.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1da0593bd3080bb641f41a9cf5e0827eb3d4364c32e70462b054471773c6e75a
|
|
| MD5 |
22de085b16867b9a65e5c73632cc5ef8
|
|
| BLAKE2b-256 |
7973a510c46f9bf132a7695e9f0464e486a4f68d981d4df68944b9ab76b70e7e
|