Coder Social home page Coder Social logo

mlliarm / yapapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from golemfactory/yapapi

0.0 1.0 0.0 12.27 MB

Python high-level API for Golem.

Home Page: https://yapapi.readthedocs.io/en/stable/

License: GNU Lesser General Public License v3.0

Python 99.38% Dockerfile 0.04% Shell 0.58%

yapapi's Introduction

Golem Python API

Tests - Status Docs status PyPI - Status PyPI version GitHub license GitHub issues

What's Golem and yapapi?

Golem is a global, open-source, decentralized supercomputer that anyone can access. It connects individual machines to form a vast network which combines their resources and allows requestors to utilize its unique potential - which may be its combined computing power, storage, the geographical distribution or its censorship resistance.

Yapapi is the Python high-level API that allows developers to connect to their Golem nodes and manage their distributed, computational loads through Golem Network.

Golem application development

For a detailed introduction to using Golem and yapapi to run your tasks on Golem and a guide to Golem Network application development in general, please consult our handbook.

Installation

yapapi is available as a PyPI package.

You can install it through pip:

pip install yapapi

Or if your project uses poetry you can add it to your dependencies like this:

poetry add yapapi

API Reference

For a comprehensive API reference, please refer to our official readthedocs page.

Local setup for yapapi developers

Poetry

yapapi uses poetry to manage its dependencies and provide a runner for common tasks.

If you don't have poetry available on your system then follow its installation instructions before proceeding. Verify your installation by running:

poetry --version

Project dependencies

To install the project's dependencies run:

poetry install

By default, poetry looks for the required Python version on your PATH and creates a virtual environment for the project if there's none active (or already configured by Poetry).

All of the project's dependencies will be installed to that virtual environment.

Running goth integration tests

Prerequisites

If you'd like to run the yapapi integration test suite locally then you'll need to install an additional set of dependencies separately.

First, install the dependencies required to run goth.

Next, configure goth's GitHub API token.

Now, you can install goth and its additional python requirements:

poetry install -E integration-tests

Finally, generate goth's default assets:

poetry run poe goth-assets

Running the tests

Once you have the environment set up, to run all the integration tests, use:

poetry run poe goth-tests

See also

Environment variables

It's possible to set various elements of yagna configuration through environment variables. yapapi currently supports the following environment variables:

  • YAGNA_ACTIVITY_URL, URL to yagna activity API, e.g. http://localhost:7500/activity-api/v1
  • YAGNA_API_URL, base URL to yagna REST API, e.g. http://localhost:7500
  • YAGNA_APPKEY, yagna app key to be used, e.g. a70facb9501d4528a77f25574ab0f12b
  • YAGNA_MARKET_URL, URL to yagna market API, e.g. http://localhost:7500/market-api/v1
  • YAGNA_PAYMENT_NETWORK, Ethereum network name for yagna to use, e.g. rinkeby
  • YAGNA_PAYMENT_DRIVER, payment driver name for yagna to use, e.g. erc20
  • YAGNA_PAYMENT_URL, URL to yagna payment API, e.g. http://localhost:7500/payment-api/v1
  • YAGNA_SUBNET, name of the yagna sub network to be used, e.g. devnet-beta
  • YAPAPI_USE_GFTP_CLOSE, if set to a truthy value (e.g. "1", "Y", "True", "on") then yapapi will ask gftp to close files when there's no need to publish them any longer. This may greatly reduce the number of files kept open while yapapi is running but requires yagna 0.7.3 or newer, with older versions it will cause errors.

yapapi's People

Contributors

shadeofblue avatar azawlocki avatar johny-b avatar kmazurek avatar filipgolem avatar prekucki avatar jiivan avatar mfranciszkiewicz avatar tworec avatar mdtanrikulu avatar rad9k avatar etam avatar maaktweluit avatar krunch3r76 avatar 83tb avatar mateuszsrebrny avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.