opthub_client


Nameopthub_client JSON
Version 0.5.1 PyPI version JSON
download
home_pagehttps://github.com/opthub-org/opthub-client
SummaryLibrary for Opthub CLI tools.
upload_time2024-09-26 16:13:20
maintainerNone
docs_urlNone
authorOpthub Inc.
requires_python<4.0,>=3.10
licenseMIT
keywords opthub cli
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [日本語版](https://github.com/opthub-org/opthub-client/blob/main/README_ja.md) 👈

# OptHub Client

![Skills](https://skillicons.dev/icons?i=py,graphql,vscode,github)

The Opthub Client is a Python package that provides the following features:

- Submitting solutions to OptHub competitions
- Checking the history and status of solutions submitted to OptHub competitions

This section explains how to install the OptHub Client and provides a tutorial. For more detailed instructions, please refer to the [OptHub Client User Guide](https://opthub.notion.site/OptHub-Client-User-Guide-ece08c9977ec4733b7cbeb2d5bafb797?pvs=4).

## Installation
Make sure you have Python 3.10 or higher installed and that you have set up pip as your package manager. Then, run the following command to install opthub-client from PyPI.

```bash
$ pip install opthub-client
```

## Tutorial

In this tutorial, we will explain how to submit solutions for the competitions you are participating in and how to review the history of your submissions.

To submit solutions, you need to create an account and join a competition beforehand.

👉 [How to Create an Account and Join a Competition](https://opthub.notion.site/Tutorial-23febfdfbb7c41d0893a6681f3e7ae20?pvs=4)

### Login

Execute `opt login` and enter your username and password.

```bash
$ opt login
Username: [username] # Your username
Password: [password]   # Your password
Hello [username]. Successfully logged in.
```

⚠ You need to create an account and verify your email address beforehand.

### Select a Competition and Match

Execute `opt select` and select a competition and match.

```bash
$ opt select
? Select a competition: [competition_id] # Use ↑↓ keys to select a competition
? Select a match: [match_id] # Use ↑↓ keys to select a match
You have selected [competition_id]/[match_id]
```

⚠ You need to join at least one competition beforehand.

### Submit a Solution

Execute `opt submit` and enter a solution according to the competition's input/output requirements.

```bash
$ opt submit
? Write the solution: [your_solution] # Enter your solution
Submitting to [competition_id]/[match_id]... # Submitting
...Submitted # Submission complete
```

👉 [How to submit solutions from files](https://opthub.notion.site/submit-Submit-a-solution-2192134bad9b40c39670b567dd6d8f3f?pvs=4)
👉 [How to submit solutions by your program](https://opthub.notion.site/How-to-Use-OptHub-API-8f54f4456319430b85039c06ec6cc14e?pvs=4)

### Check Submitted Solutions

Execute `opt show trials` to display the solutions you have submitted. Press `n` to display the next 20 solutions, or press `e` to exit the check.

```bash
$ opt show trials # Displays 20 solutions in descending order by default
Trial No: 30, status: success, Score: 0.0001
Trial No: 29, status: scoring
Trial No: 28, status: evaluating
・・・
n: next solutions, e: exit
# Press n to display the next 20 solutions, e to exit the check
```

### Download Submitted Solutions

Execute `opt download` to download the solutions by specifying the range of trial numbers.

```bash
$ opt download -s 10 -e 30 # Download trial numbers 10 to 30
Downloading trials  [####################################]  100%
Trials have been written to trials_match1.json
```

👉 [Format of the Output JSON File](https://opthub.notion.site/download-Download-the-solutions-c77b44f02df24609a8f04490d6036e77?pvs=4)

## For Contributors

Follow these steps to set up the environment:

1. Clone this repository.
2. Set up Poetry.
3. Run `poetry install`.
4. Download the recommended VSCode Extensions.
5. Disable the following VS Code Extensions for this workspace to avoid conflicts with other packages:
    - ms-python.pylint
    - ms-python.black-formatter
    - ms-python.flake8
    - ms-python.isort

Once you have completed the above setup, you can use the `opt` command in the project's root directory.

## Contact <a id="Contact"></a>

If you have any questions or concerns, please feel free to contact us (Email: dev@opthub.ai).

<img src="https://opthub.ai/assets/images/logo.svg" width="200">


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/opthub-org/opthub-client",
    "name": "opthub_client",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "opthub, cli",
    "author": "Opthub Inc.",
    "author_email": "dev@opthub.ai",
    "download_url": "https://files.pythonhosted.org/packages/1c/10/266c752b52ebaf53060dbf738b3bbf4b2ac620ae242e5d3f14c07b3ef246/opthub_client-0.5.1.tar.gz",
    "platform": null,
    "description": "[\u65e5\u672c\u8a9e\u7248](https://github.com/opthub-org/opthub-client/blob/main/README_ja.md) \ud83d\udc48\n\n# OptHub Client\n\n![Skills](https://skillicons.dev/icons?i=py,graphql,vscode,github)\n\nThe Opthub Client is a Python package that provides the following features:\n\n- Submitting solutions to OptHub competitions\n- Checking the history and status of solutions submitted to OptHub competitions\n\nThis section explains how to install the OptHub Client and provides a tutorial. For more detailed instructions, please refer to the [OptHub Client User Guide](https://opthub.notion.site/OptHub-Client-User-Guide-ece08c9977ec4733b7cbeb2d5bafb797?pvs=4).\n\n## Installation\nMake sure you have Python 3.10 or higher installed and that you have set up pip as your package manager. Then, run the following command to install opthub-client from PyPI.\n\n```bash\n$ pip install opthub-client\n```\n\n## Tutorial\n\nIn this tutorial, we will explain how to submit solutions for the competitions you are participating in and how to review the history of your submissions.\n\nTo submit solutions, you need to create an account and join a competition beforehand.\n\n\ud83d\udc49 [How to Create an Account and Join a Competition](https://opthub.notion.site/Tutorial-23febfdfbb7c41d0893a6681f3e7ae20?pvs=4)\n\n### Login\n\nExecute `opt login` and enter your username and password.\n\n```bash\n$ opt login\nUsername: [username] # Your username\nPassword: [password]   # Your password\nHello [username]. Successfully logged in.\n```\n\n\u26a0 You need to create an account and verify your email address beforehand.\n\n### Select a Competition and Match\n\nExecute `opt select` and select a competition and match.\n\n```bash\n$ opt select\n? Select a competition: [competition_id] # Use \u2191\u2193 keys to select a competition\n? Select a match: [match_id] # Use \u2191\u2193 keys to select a match\nYou have selected [competition_id]/[match_id]\n```\n\n\u26a0 You need to join at least one competition beforehand.\n\n### Submit a Solution\n\nExecute `opt submit` and enter a solution according to the competition's input/output requirements.\n\n```bash\n$ opt submit\n? Write the solution: [your_solution] # Enter your solution\nSubmitting to [competition_id]/[match_id]... # Submitting\n...Submitted # Submission complete\n```\n\n\ud83d\udc49 [How to submit solutions from files](https://opthub.notion.site/submit-Submit-a-solution-2192134bad9b40c39670b567dd6d8f3f?pvs=4)\n\ud83d\udc49\u00a0[How to submit solutions by your program](https://opthub.notion.site/How-to-Use-OptHub-API-8f54f4456319430b85039c06ec6cc14e?pvs=4)\n\n### Check Submitted Solutions\n\nExecute `opt show trials` to display the solutions you have submitted. Press `n` to display the next 20 solutions, or press `e` to exit the check.\n\n```bash\n$ opt show trials # Displays 20 solutions in descending order by default\nTrial No: 30, status: success, Score: 0.0001\nTrial No: 29, status: scoring\nTrial No: 28, status: evaluating\n\u30fb\u30fb\u30fb\nn: next solutions, e: exit\n# Press n to display the next 20 solutions, e to exit the check\n```\n\n### Download Submitted Solutions\n\nExecute `opt download` to download the solutions by specifying the range of trial numbers.\n\n```bash\n$ opt download -s 10 -e 30 # Download trial numbers 10 to 30\nDownloading trials  [####################################]  100%\nTrials have been written to trials_match1.json\n```\n\n\ud83d\udc49 [Format of the Output JSON File](https://opthub.notion.site/download-Download-the-solutions-c77b44f02df24609a8f04490d6036e77?pvs=4)\n\n## For Contributors\n\nFollow these steps to set up the environment:\n\n1. Clone this repository.\n2. Set up Poetry.\n3. Run `poetry install`.\n4. Download the recommended VSCode Extensions.\n5. Disable the following VS Code Extensions for this workspace to avoid conflicts with other packages:\n    - ms-python.pylint\n    - ms-python.black-formatter\n    - ms-python.flake8\n    - ms-python.isort\n\nOnce you have completed the above setup, you can use the `opt` command in the project's root directory.\n\n## Contact <a id=\"Contact\"></a>\n\nIf you have any questions or concerns, please feel free to contact us (Email: dev@opthub.ai).\n\n<img src=\"https://opthub.ai/assets/images/logo.svg\" width=\"200\">\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Library for Opthub CLI tools.",
    "version": "0.5.1",
    "project_urls": {
        "Documentation": "https://github.com/opthub-org/opthub-client",
        "Homepage": "https://github.com/opthub-org/opthub-client",
        "Repository": "https://github.com/opthub-org/opthub-client"
    },
    "split_keywords": [
        "opthub",
        " cli"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "49af833630bfef6175e10fda13f81df670b336bd3ac6907d018e7bfa840b91d9",
                "md5": "fb10a0f518a5b08b46c7c2b12b5024de",
                "sha256": "c25ef6d72616205c6f5aba9058f31f16f88a73a57d07170f41d6d090b42ce41c"
            },
            "downloads": -1,
            "filename": "opthub_client-0.5.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fb10a0f518a5b08b46c7c2b12b5024de",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 35070,
            "upload_time": "2024-09-26T16:13:19",
            "upload_time_iso_8601": "2024-09-26T16:13:19.736512Z",
            "url": "https://files.pythonhosted.org/packages/49/af/833630bfef6175e10fda13f81df670b336bd3ac6907d018e7bfa840b91d9/opthub_client-0.5.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1c10266c752b52ebaf53060dbf738b3bbf4b2ac620ae242e5d3f14c07b3ef246",
                "md5": "86467866cc4a882e10d0c2dda0991abf",
                "sha256": "53eb2c8b03d04ac1c14692e0dc09adea60b688bd575224f73ae7618e3bf3d564"
            },
            "downloads": -1,
            "filename": "opthub_client-0.5.1.tar.gz",
            "has_sig": false,
            "md5_digest": "86467866cc4a882e10d0c2dda0991abf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 22224,
            "upload_time": "2024-09-26T16:13:20",
            "upload_time_iso_8601": "2024-09-26T16:13:20.940252Z",
            "url": "https://files.pythonhosted.org/packages/1c/10/266c752b52ebaf53060dbf738b3bbf4b2ac620ae242e5d3f14c07b3ef246/opthub_client-0.5.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-26 16:13:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "opthub-org",
    "github_project": "opthub-client",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "opthub_client"
}
        
Elapsed time: 2.00654s