Skip to content

Commit

Permalink
Merge pull request skycoin#125 from simelo/stdevMac_t86_generate_pyth…
Browse files Browse the repository at this point in the history
…on_api

fixes skycoin#86 - Generate Python client for Skycoin node REST API
  • Loading branch information
olemis authored Apr 26, 2019
2 parents 1b73050 + 8ece03e commit ff67436
Show file tree
Hide file tree
Showing 96 changed files with 10,107 additions and 10,052 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ matrix:
- os: osx
languague: generic
env:
- PYTHON=2.7
- PYTHON=2.7.16
- TOXENV=py27
- os: osx
languague: generic
Expand Down
4 changes: 2 additions & 2 deletions .travis/install-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ chmod +x "$HOME/bin/gimme"
# Install Python libraries
$PIP install --upgrade pip setuptools tox-travis
$PIP install -r "$REPO_ROOT/requirements.dev.txt"
$PIP install -r "$REPO_ROOT/skyapi/requirements.txt"
$PIP install -r "$REPO_ROOT/skyapi/test-requirements.txt"
$PIP install -r "$REPO_ROOT/lib/skyapi/requirements.txt"
$PIP install -r "$REPO_ROOT/lib/skyapi/test-requirements.txt"

# Compile SWIG
mkdir swig_build && \
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## PySkycoin 0.25.1 - 2019/03/14

### Added

- Add `skyapi`, a wrapper for Skycoin node REST API at version 0.25.1

### Fixed

### Changed

### Removed

### Known issues

## PySkycoin 0.25.0 - 2019/01/01

### Added
Expand Down
6 changes: 5 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include requirements.dev.txt

include Makefile
include gopath/src/github.com/skycoin/skycoin/Makefile
recursive-exclude *.a
recursive-exclude . *.a
include skycoin.py

recursive-include . *.s
Expand All @@ -25,6 +25,10 @@ recursive-include gopath/src/github.com/skycoin/skycoin/include *
recursive-exclude . *.orig
exclude .github
exclude .travis
exclude lib/skyapi
exclude .pytest_cache
recursive-exclude .github *
recursive-exclude .travis *
recursive-exclude lib/skyapi *
recursive-exclude .pytest_cache *

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ SRC_FILES = $(shell find $(SKYCOIN_DIR)/src -type f -name "*.go")
SWIG_FILES = $(shell find $(LIBSWIG_DIR) -type f -name "*.i")
HEADER_FILES = $(shell find $(SKYCOIN_DIR)/include -type f -name "*.h")

PYTHON_CLIENT_DIR = skyapi
PYTHON_CLIENT_DIR = lib/skyapi

ifeq ($(shell uname -s),Linux)
TEMP_DIR = tmp
Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ A Python extension generated with SWIG to access Skycoin API from Python.
- [Update the version](#update-the-version)
- [Pre-release testing](#pre-release-testing)
- [Creating release builds](#creating-release-builds)
- [Python wrapper for Skycoin Api](#python-wrapper-for-skycoin-api)
<!-- /MarkdownTOC -->

## Installation
Expand Down Expand Up @@ -252,3 +253,22 @@ python3 -m pip install --user --upgrade twine
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
```

#### Python wrapper for Skycoin Api

This wrapper is Auto generated by openapi-generator directly from `Skycoin Api` code for version v0.25.1.

For further details of usage of `Python wrapper for Skycoin Api` see [Autogenerated documentation](./skyapi/README.md)

To use wrapper for specific node of Skycoin api, just do the next:

```python

# create an instance of the Configuration class
configuration = skyapi.Configuration()
# set new host
configuration.host = 'some_host'

# create an instance of the API class with new configuration
api_instance = skyapi.DefaultApi(skyapi.ApiClient(configuration))

```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 8 additions & 7 deletions skyapi/README.md → lib/skyapi/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# openapi-client
# Skycoin node API client

Skycoin is a next-generation cryptocurrency.

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
Expand All @@ -24,7 +25,7 @@ pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

Then import the package:
```python
import openapi_client
import skyapi
```

### Setuptools
Expand All @@ -38,7 +39,7 @@ python setup.py install --user

Then import the package:
```python
import openapi_client
import skyapi
```

## Getting Started
Expand All @@ -48,12 +49,12 @@ Please follow the [installation procedure](#installation--usage) and then run th
```python
from __future__ import print_function
import time
import openapi_client
from openapi_client.rest import ApiException
import skyapi
from skyapi.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = openapi_client.DefaultApi(openapi_client.ApiClient(configuration))
api_instance = skyapi.DefaultApi(skyapi.ApiClient(configuration))

try:
# Returns the total number of unique address that have coins.
Expand Down Expand Up @@ -160,6 +161,6 @@ Class | Method | HTTP request | Description

## Author

skycoin.[email protected]
contact@skycoin.net


File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit ff67436

Please sign in to comment.