Skip to main content

Universal Parser Tool

Version Downloads License

This tool (a.k.a upt) helps to fetch sample tests from online judges. It can be useful to speedup testing codes before final submit.

Install

You can install upt from pypi using this command:

$ pip install universal-parser-tool

You should be able to run upt after install.

To login services and use parsers on private webpages, you need to install a supported browser and its driver.

Browser Driver Supported Tested
Firefox https://github.com/mozilla/geckodriver/releases ✅ ✅
Chromium/Chrome https://sites.google.com/a/chromium.org/chromedriver/downloads ✅ ✅
Edge https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ ✅ ❌
Safari Built-in ✅ ❌
Opera https://github.com/operasoftware/operachromiumdriver/releases ❌ ❌
IE https://selenium-release.storage.googleapis.com/index.html ❌ ❌

Configurations

All configurations stored at ~/.config/upt, including upt.conf (general configs) and cookie.jar (login cookies).

After installing, You may run upt init to initialize config options.

Upgrade

You can check current version by running upt -v. Upgrade to newer version by this command.

$ pip install -U universal-parser-tool

Parsers

At this time, these judges have built-in support.

NOTE: You need to login a service if you want to use it during contest.

Plugins

It is possible to develop and publish your own plugins of upt. In this context, plugins are python modules, and their name starts with upt-. Several built-in parsers are included in upt-builtin.

The plugin must provide a register function, returning a list of classes (inherited from BaseParser). After installing the module, upt automatically finds the plugin and calls register.

There is a documented example of a parser here. upt-builtin is another example that's been tested.

If you have written a good plugin for upt and have published it on PyPI, notify me so I can add it here.

Release files for universal-parser-tool 5.0.1

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

Source distribution (sdist)

Source distribution for universal-parser-tool 5.0.1
File Size Uploaded
universal-parser-tool-5.0.1.tar.gz 20.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for universal-parser-tool 5.0.1
File Interpreter ABI Platform
universal_parser_tool-5.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 45.5 kB

Release files / universal-parser-tool-5.0.1.tar.gz

Download URL universal-parser-tool-5.0.1.tar.gz
Size 20.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0a6f1d0e04114b9f6870aba59931e3c6b09af4e5e12b9e2c29b4081625134335
BLAKE2b-256 checksum
How to use checksums
3a03384422089e0887f818d1e36a00c9894888fc9e4348f4a796b974aaffee3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

Release files / universal_parser_tool-5.0.1-py3-none-any.whl

Download URL universal_parser_tool-5.0.1-py3-none-any.whl
Size 24.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83a1b479b0014772e3ec9152cb7ff9340a09e9d94d1d8ce1c672027cae1dbe63
BLAKE2b-256 checksum
How to use checksums
66b4b67d62a4c272fcd8828a88f93d2abb9312d3ccdaa0c00e8100c6263d2ccb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

Release history Release notifications | RSS feed

This release

5.0.1 This release

2 release files

5.0.0

2 release files

4.1.3

2 release files

4.1.2

2 release files

4.1.1

2 release files

4.1.0

2 release files

4.0.2

2 release files

4.0.1

1 release file

4.0.0

1 release file

3.2.0

1 release file

3.1.1

1 release file

3.1.0

1 release file

3.0.0

1 release file

2.0.1

2 release files

2.0.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.1.7

2 release files

0.1.5

2 release files

0.1.4

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