spacestudio-constellation


Namespacestudio-constellation JSON
Version 3.4.4 PyPI version JSON
download
home_pageNone
Summaryspacestudio™ constellation scripting API
upload_time2024-03-28 17:00:47
maintainerNone
docs_urlNone
authorExotrail
requires_pythonNone
licenseNone
keywords spacestudio constellation scripting propulsion
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # space**studio**™ Scripting API Documentation

## Table of contents

### 1. [Installation](#installation)

### 2. [Connection](#connection)

- [Environment variables](#environment-variables)

---

## Installation

1. You will need to have both Python and pip installed on your computer.
2. Install the space**studio™** constellation client with the following command:

```bash
pip install spacestudio-constellation
```

This will install the `spacestudio` package, the `requests` library, used to perform HTTP calls, and the `jwt` library, used to decode JWTs.

3. In your Python script, import the library by adding this line at the very top of your file:

```python
import spacestudio
```

4. The library has now been imported, you can start using it.

---

## Connection

In order to use the library, you need to be connected. You can do so by calling the `connect()` function:

```python
spacestudio.connect(url, mail, password, client_id)
```

You need to replace the parameter `url` with the URL you have been given in order to use the scripting API, `mail` with the email address you use to connect to spacestudio™, `password` with your password and `client_id` by the client identifier that was provided to you by Exotrail.

From this point on, you will be connected to the API.

### Environment variables

Alternatively to writing your `url`, `mail`, `password` and `client_id` each time you create a new script, these informations can also be saved in an external file, so that the API script needs only to read it. This can be particularly useful for sharing scripts between different users, where each user could keep the sensitive information file private and share only the script.

This can be done by using a `.env` file, as the one provided as example. This file contains a default `url` and placeholders for the user's `mail`, `password`, and `client_id` in the form of the variables `LOG_BASE_URL`, `LOG_MAIL`, `LOG_PASSWORD` and `CLIENT_ID`, respectively. To use this file in your script, you must add the following lines to the start of your script:

```python
  from dotenv import load_dotenv
  load_dotenv()
```

and the connection can be done by:

```python
  base_url = spacestudio.log_base_url
  mail = spacestudio.log_mail
  password = spacestudio.log_password
  client_id = spacestudio.log_client_id
  spacestudio.connect(base_url, mail, password, client_id)
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "spacestudio-constellation",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "spacestudio constellation scripting propulsion",
    "author": "Exotrail",
    "author_email": "support.spacestudio@exotrail.com",
    "download_url": "https://files.pythonhosted.org/packages/75/96/7d54fe7e4db55a072f51b7a9c8cffe2b6420bd9ebb44c654d40e2a0c3577/spacestudio-constellation-3.4.4.tar.gz",
    "platform": null,
    "description": "# space**studio**\u2122 Scripting API Documentation\n\n## Table of contents\n\n### 1. [Installation](#installation)\n\n### 2. [Connection](#connection)\n\n- [Environment variables](#environment-variables)\n\n---\n\n## Installation\n\n1. You will need to have both Python and pip installed on your computer.\n2. Install the space**studio\u2122** constellation client with the following command:\n\n```bash\npip install spacestudio-constellation\n```\n\nThis will install the `spacestudio` package, the `requests` library, used to perform HTTP calls, and the `jwt` library, used to decode JWTs.\n\n3. In your Python script, import the library by adding this line at the very top of your file:\n\n```python\nimport spacestudio\n```\n\n4. The library has now been imported, you can start using it.\n\n---\n\n## Connection\n\nIn order to use the library, you need to be connected. You can do so by calling the `connect()` function:\n\n```python\nspacestudio.connect(url, mail, password, client_id)\n```\n\nYou need to replace the parameter `url` with the URL you have been given in order to use the scripting API, `mail` with the email address you use to connect to spacestudio\u2122, `password` with your password and `client_id` by the client identifier that was provided to you by Exotrail.\n\nFrom this point on, you will be connected to the API.\n\n### Environment variables\n\nAlternatively to writing your `url`, `mail`, `password` and `client_id` each time you create a new script, these informations can also be saved in an external file, so that the API script needs only to read it. This can be particularly useful for sharing scripts between different users, where each user could keep the sensitive information file private and share only the script.\n\nThis can be done by using a `.env` file, as the one provided as example. This file contains a default `url` and placeholders for the user's `mail`, `password`, and `client_id` in the form of the variables `LOG_BASE_URL`, `LOG_MAIL`, `LOG_PASSWORD` and `CLIENT_ID`, respectively. To use this file in your script, you must add the following lines to the start of your script:\n\n```python\n  from dotenv import load_dotenv\n  load_dotenv()\n```\n\nand the connection can be done by:\n\n```python\n  base_url = spacestudio.log_base_url\n  mail = spacestudio.log_mail\n  password = spacestudio.log_password\n  client_id = spacestudio.log_client_id\n  spacestudio.connect(base_url, mail, password, client_id)\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "spacestudio\u2122 constellation scripting API",
    "version": "3.4.4",
    "project_urls": null,
    "split_keywords": [
        "spacestudio",
        "constellation",
        "scripting",
        "propulsion"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "75967d54fe7e4db55a072f51b7a9c8cffe2b6420bd9ebb44c654d40e2a0c3577",
                "md5": "a6a2114d1740fa71aabd534db09527df",
                "sha256": "c85f9b7a7c128045b57b517e40d198edba4edd923218a89a873ffe84f44e4be2"
            },
            "downloads": -1,
            "filename": "spacestudio-constellation-3.4.4.tar.gz",
            "has_sig": false,
            "md5_digest": "a6a2114d1740fa71aabd534db09527df",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 18434,
            "upload_time": "2024-03-28T17:00:47",
            "upload_time_iso_8601": "2024-03-28T17:00:47.517524Z",
            "url": "https://files.pythonhosted.org/packages/75/96/7d54fe7e4db55a072f51b7a9c8cffe2b6420bd9ebb44c654d40e2a0c3577/spacestudio-constellation-3.4.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-28 17:00:47",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "spacestudio-constellation"
}
        
Elapsed time: 0.27286s