📜 ⬆️ ⬇️

ep.io - hosting for python web applications

Just want to say that I have nothing to do with the company that created this service.

Introduction


Before I tried hosting from ep.io, I had several times mentioned it on the Internet, mainly on the bourgeois websites. The reviews were only positive, the geeks were happy and praised the service. In the end, I finally decided to try it and a short correspondence with the support of the service gave my results - I was given an invite.

For what?


As it is written in the documentation, the hosting is designed for Django, Pylons, Pyramid, Flask, Trac or any other WSGI-compatible applications. I have so far managed to try to play around with small applications on the bottle framework.

Registration and getting started


Simple registration and in front of us opens the hosting control panel, in which you can edit your data, such as password, SSH keys and billing information. We also see a page with a list of applications, where you can see the status of all your applications, as well as add a new one:

In fact, each application is a separate subdomain in the system of the type application_name.ep.io, which runs in its own virtual environment. But you can also link your own domain.
')
Before downloading the project, you must create a settings file in the root of your project. To do this, you need to create an epio.ini file and fill it up as you need. The syntax is described in detail in the official documentation .

A convenient feature of the service is the ability to provide access to a separate application for third parties:


The process of downloading the application to the server is very clear in the documentation, so I will not retell it. I can only say that I did not immediately understand how to properly upload my files into a specific application. It turned out that you just need to add the -a key with the name of the desired application as a parameter. That is, to upload files to the “inlanger” application, you need to write the “epio upload -a inlanger” command.

Here is an example of a simple application that works and is available at inlanger.ep.io :

Server.py file
# -*- coding: utf-8 -*- from bottle import * app = Bottle() @app.route('/') def home(): return '<h1>Hello habr!</h1><br /><a href="/test">Go test URL</a>' @app.route('/test') def test(): return '<h1>This is a test URL!</h1>' run(app, server='gunicorn') 

Do not forget to upload the file bottle.py to the root of the project!

Epio.ini file
 [wsgi] entrypoint = server:home 

For debugging, the last 500 lines of console output are provided, which is available for each individual application.

Epio.ini file


This file is essentially all the settings of your project. In it, you expose the cron settings, the necessary libraries for the operation of your application, the path to statics, and much more. You can even select the desired version of Python.

Data storage


Until recently, the service did not provide access to the file system. Now the service allows you to write in a separate folder, the path to which can be obtained from the environment variable EPIO_DATA_DIRECTORY. As a database, you can use Redis or PostgreSQL (appeared recently). Another important BUT - if you want to send email from your application - you will need to use third-party services, since this feature is disabled for the service.

Prices


For the curious, there are free quotas. If you miss them, you can increase them. You can increase the number of instances, the amount of monthly traffic and expand space on the hard drive. Prices are not that low, but adequate.

Conclusion


For those who want to learn more about the technical side of this service and about the environment in which your application will be located, I can advise you to read the official documentation . From myself I can say that the service is very young, but it is actively gaining fans in the west. The good news is that while free quotas are available, which may well cover the work of a simple application that will help assess the capabilities of the platform. For some simple applications, such as the home page, more is not needed. I personally use this platform as a kind of playground for small ideas that often pop up in my head. I managed to exchange a few words on UAPycon with Andrew Godwin, one of the creators of the service, and from this it was clear that the hosting would continue to develop, which can be seen even over the last month. Since I use the service for a short time, I will be happy with other reviews in the comments about the platform.

Source: https://habr.com/ru/post/134257/


All Articles