taipy-rest


Nametaipy-rest JSON
Version 4.0.0 PyPI version JSON
download
home_pageNone
SummaryLibrary to expose taipy-core REST APIs.
upload_time2024-10-09 11:01:02
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseApache License 2.0
keywords taipy-rest
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Taipy REST

## License

Copyright 2021-2024 Avaiga Private Limited

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of the License at
[http://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt)

Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions
and limitations under the License.

## What is Taipy REST

Taipy is a Python library for creating Business Applications. More information on our
[website](https://www.taipy.io). Taipy is split into multiple packages including
*taipy-core* and *taipy-rest* to let users install the minimum they need.

Taipy Core mostly includes business-oriented
features. It helps users create and manage business applications and improve analyses
capability through time, conditions and hypothesis.

Taipy REST is a set of APIs built on top of the
*taipy-core* library developed by Avaiga. This project is meant to be used as a complement
for Taipy and its goal is to enable automation through rest APIs of processes built
on Taipy.

## Installation

The latest stable version of *taipy-rest* is available through *pip*:
```bash
pip install taipy-rest
```

### Development version

You can install the development version of *taipy-rest* with *pip* and *git* via the taipy repository:
```bash
pip install git+https://git@github.com/Avaiga/taipy
```

This command installs the development version of *taipy* package in the Python environment with all
its dependencies, including the *taipy-rest* package.

If you need the source code for *taipy-rest* on your system so you can see how things are done or
maybe participate in the improvement of the packages, you can clone the GitHub repository:

```bash
git clone https://github.com/Avaiga/taipy.git
```

This creates the 'taipy' directory holding all the package's source code, and the 'taipy-rest'
source code is in the 'taipy/rest' directory.

## Configuration

Before running, we need to define some variables. Taipy REST APIs depend on pre-configuration of taipy config objects,
i.e, is mandatory to define all configuration of DataNodes, Tasks, Sequences, etc. The file containing this
configuration needs to be passed to the application at runtime. The following variable needs to be defined:
 - TAIPY_SETUP_FILE: the path to the file containing all of taipy object configuration

If using Docker, the folder containing the file needs to be mapped as a volume for it to be accessible to the
application.

## Running

To run taipy-rest, you need to install the required development packages.
We recommend using [Pipenv](https://pipenv.pypa.io/en/latest/) to create a virtual environment
and install the development packages.

```bash
pip install pipenv
pipenv install --dev
```

To run the application you can either run locally with:
```bash
flask run
```

or it can be run inside Docker with:
```bash
docker-compose up
```

You can also run with a Gunicorn or wsgi server.

### Running with Gunicorn

This project provide a simple wsgi entry point to run gunicorn or uwsgi for example.

For gunicorn you only need to run the following commands

```bash
pip install gunicorn

gunicorn myapi.wsgi:app
```
And that's it! Gunicorn is running on port 8000.

If you chose gunicorn as your wsgi server, the proper commands should be in your docker-compose file.

### Running with uwsgi

Pretty much the same as gunicorn here

```bash
pip install uwsgi
uwsgi --http 127.0.0.1:5000 --module myapi.wsgi:app
```

And that's it! Uwsgi is running on port 5000.

If you chose uwsgi as your wsgi server, the proper commands should be in your docker-compose file.

### Deploying on Heroku

Make sure you have a working Docker installation (e.g. docker ps) and that you’re logged in to Heroku (heroku login).

Log in to Container Registry:

```bash
heroku container:login
```

Create a heroku app
```bash
heroku create
```

Build the image and push to Container Registry:
```bash
heroku container:push web
```

Then release the image:
```bash
heroku container:release web
```

You can now access *taipy-rest* on the URL that was returned on the `heroku create` command.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "taipy-rest",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "taipy-rest",
    "author": null,
    "author_email": "Avaiga <dev@taipy.io>",
    "download_url": "https://files.pythonhosted.org/packages/f8/a0/8073d1097be132f476de636bac5bc83353be97ebec2d5f1d941e14d99abc/taipy-rest-4.0.0.tar.gz",
    "platform": null,
    "description": "# Taipy REST\n\n## License\n\nCopyright 2021-2024 Avaiga Private Limited\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file\nexcept in compliance with the License. You may obtain a copy of the License at\n[http://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt)\n\nUnless required by applicable law or agreed to in writing, software distributed under the\nLicense is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,\neither express or implied. See the License for the specific language governing permissions\nand limitations under the License.\n\n## What is Taipy REST\n\nTaipy is a Python library for creating Business Applications. More information on our\n[website](https://www.taipy.io). Taipy is split into multiple packages including\n*taipy-core* and *taipy-rest* to let users install the minimum they need.\n\nTaipy Core mostly includes business-oriented\nfeatures. It helps users create and manage business applications and improve analyses\ncapability through time, conditions and hypothesis.\n\nTaipy REST is a set of APIs built on top of the\n*taipy-core* library developed by Avaiga. This project is meant to be used as a complement\nfor Taipy and its goal is to enable automation through rest APIs of processes built\non Taipy.\n\n## Installation\n\nThe latest stable version of *taipy-rest* is available through *pip*:\n```bash\npip install taipy-rest\n```\n\n### Development version\n\nYou can install the development version of *taipy-rest* with *pip* and *git* via the taipy repository:\n```bash\npip install git+https://git@github.com/Avaiga/taipy\n```\n\nThis command installs the development version of *taipy* package in the Python environment with all\nits dependencies, including the *taipy-rest* package.\n\nIf you need the source code for *taipy-rest* on your system so you can see how things are done or\nmaybe participate in the improvement of the packages, you can clone the GitHub repository:\n\n```bash\ngit clone https://github.com/Avaiga/taipy.git\n```\n\nThis creates the 'taipy' directory holding all the package's source code, and the 'taipy-rest'\nsource code is in the 'taipy/rest' directory.\n\n## Configuration\n\nBefore running, we need to define some variables. Taipy REST APIs depend on pre-configuration of taipy config objects,\ni.e, is mandatory to define all configuration of DataNodes, Tasks, Sequences, etc. The file containing this\nconfiguration needs to be passed to the application at runtime. The following variable needs to be defined:\n - TAIPY_SETUP_FILE: the path to the file containing all of taipy object configuration\n\nIf using Docker, the folder containing the file needs to be mapped as a volume for it to be accessible to the\napplication.\n\n## Running\n\nTo run taipy-rest, you need to install the required development packages.\nWe recommend using [Pipenv](https://pipenv.pypa.io/en/latest/) to create a virtual environment\nand install the development packages.\n\n```bash\npip install pipenv\npipenv install --dev\n```\n\nTo run the application you can either run locally with:\n```bash\nflask run\n```\n\nor it can be run inside Docker with:\n```bash\ndocker-compose up\n```\n\nYou can also run with a Gunicorn or wsgi server.\n\n### Running with Gunicorn\n\nThis project provide a simple wsgi entry point to run gunicorn or uwsgi for example.\n\nFor gunicorn you only need to run the following commands\n\n```bash\npip install gunicorn\n\ngunicorn myapi.wsgi:app\n```\nAnd that's it! Gunicorn is running on port 8000.\n\nIf you chose gunicorn as your wsgi server, the proper commands should be in your docker-compose file.\n\n### Running with uwsgi\n\nPretty much the same as gunicorn here\n\n```bash\npip install uwsgi\nuwsgi --http 127.0.0.1:5000 --module myapi.wsgi:app\n```\n\nAnd that's it! Uwsgi is running on port 5000.\n\nIf you chose uwsgi as your wsgi server, the proper commands should be in your docker-compose file.\n\n### Deploying on Heroku\n\nMake sure you have a working Docker installation (e.g. docker ps) and that you\u2019re logged in to Heroku (heroku login).\n\nLog in to Container Registry:\n\n```bash\nheroku container:login\n```\n\nCreate a heroku app\n```bash\nheroku create\n```\n\nBuild the image and push to Container Registry:\n```bash\nheroku container:push web\n```\n\nThen release the image:\n```bash\nheroku container:release web\n```\n\nYou can now access *taipy-rest* on the URL that was returned on the `heroku create` command.\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "Library to expose taipy-core REST APIs.",
    "version": "4.0.0",
    "project_urls": {
        "homepage": "https://github.com/avaiga/taipy"
    },
    "split_keywords": [
        "taipy-rest"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f8a08073d1097be132f476de636bac5bc83353be97ebec2d5f1d941e14d99abc",
                "md5": "7de406508faf89f131b1f80b69a72cc3",
                "sha256": "5274c5175ec6c6ca9186d5dbef5185412d115ff8cedae3f13965193afa965e34"
            },
            "downloads": -1,
            "filename": "taipy-rest-4.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7de406508faf89f131b1f80b69a72cc3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 9281,
            "upload_time": "2024-10-09T11:01:02",
            "upload_time_iso_8601": "2024-10-09T11:01:02.414034Z",
            "url": "https://files.pythonhosted.org/packages/f8/a0/8073d1097be132f476de636bac5bc83353be97ebec2d5f1d941e14d99abc/taipy-rest-4.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-09 11:01:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "avaiga",
    "github_project": "taipy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "taipy-rest"
}
        
Elapsed time: 0.59844s