semvec/pypi-packages huggingface dataset:
omnieq-api 1.0.0
OmniEQ API wrapper
Requires Python: >=3.6

# OmniEQ API Client

## Purpose

This library is intended to serve as a simplified interface for the [OmniEQ](https://omnieq.com/) API.

Detailed documentation on how to use the API can be found [here](https://omnieq.com/about).

## Usage

Please see _notebook/usage.ipynb_.

## Features

### Cache

Historical data is cached on disk indefinitely using the [_disckcache_](https://pypi.org/project/diskcache/) library. I felt it was safe to say what happened last week isn't going to change any time soon. (and if you figure out how, let me know)

This allows for quicker response times and avoids repeat requests.

Latest chains are cached for 15 seconds and chain expirations for 12 hours.  For the most part, everything historical doesn't expire.


### Rate Limit

Rate limiting is built-in with the ratelimit library. It adheres (near) to the rate limit specified in the docs. 

The limit may need to be adjusted if rate limit errors are being returned by the server. 


### Parallel Requests

With a rate limit of 10/s and each request taking me 0.7 seconds on a single thread (shitty wifi), I figured it'd be smart to parallelize them (duh).

So this has been built into some functions like _Client.option_ohlcv_minute_, which will aggregate a full history of an option (first checking archive dates, then requesting historical prices for each).

## Roadmap

* Issues (below)
* Token management (validate token, create pickle file, don't ask again)
* Complete API coverage (the spread builder is going to be some work)
* API error response handling
* ... documentaion (bleh)

## Issues

* Requesting historical data for prices in the future (which will obviously have no results) will be permanently cached.
mig-utils 0.1.7.4
Minimum Intrusion Grid (MiG) Utilities library

=========
mig_utils
=========

.. image:: https://travis-ci.org/rasmunk/mig_utils.svg?branch=master
    :target: https://travis-ci.org/rasmunk/mig_utils
.. image:: https://badge.fury.io/py/mig-utils.svg
    :target: https://badge.fury.io/py/mig-utils

A Minimum Intrusion Grid(MiG) utilities python library:
It includes the mig.io module that provides access to MiG Sharelinks through
python by wrapping around (https://github.com/althonos/fs.sshfs) for sshfs
connections and (https://github.com/ParallelSSH/ssh2-python.git) for sftp
which is the default and recommended connection


Installation
------------

Installation from pypi

.. code-block:: sh

    pip install mig-utils


Installation from a local git repository

.. code-block:: sh

    cd mig-utils
    pip install .


IO Example
----------

ERDA (https://erda.dk) sharelink access with python3 example.
A likewise sharelink class (IdmcShare) exists for IDMC (https://idmc.dk)

.. code-block:: python

  # First import the class that gives you access to the share in question*
  from mig.io import ERDAShare, IDMCShare

  # ERDA Sharelink example
  print("ERDA")
  # Open connection to a sharelink
  erda_share = ERDAShare('SHARELINKID')
  # List files/dirs in share
  print(erda_share.list())

  with erda_share.open('tmp', 'w') as tmp:
      tmp.write("sdfsfsf")

  # Get a _io.SFTPFileHandle object with automatic close
  with erda_share.open('tmp', 'r') as tmp:
      print(tmp.read())

  # Get a default _io.SFTPFileHandle object with manual lifetime
  file = erda_share.open('tmp', 'r')
  print(file.read())
  file.close()

  # remove file
  erda_share.remove('tmp')

  print("\n")

  # IDMC Sharelink example
  print("IDMC")
  # Open connection to a sharelink
  idmc_share = IDMCShare('SHARELINKID')
  # List files/dirs in share
  print(idmc_share.list())

  # write binary string
  with idmc_share.open('b_tmp', 'wb') as b_tmp:
      b_tmp.write(b'sadasdasd')

  # Get a _io.SFTPFileHandle object with automatic close
  with idmc_share.open('b_tmp', 'rb') as tmp:
      print(tmp.read())

  # Get a default _io.TextIOWrapper object with manual lifetime
  file = idmc_share.open('b_tmp', 'rb')
  print(file.read())
  file.close()