Giter Site home page Giter Site logo

rgglez / fc-exchange-rate-update Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 32 KB

Event handler function for Aliyun FC. Fetches data from the Exchange Rate API and uploads it to an Aliyun OSS bucket.

License: MIT License

Python 96.12% Dockerfile 3.88%
alibabacloud aliyun cronjob exchangeratesapi faas python3

fc-exchange-rate-update's Introduction

fc-exchange-rate-update

License GitHub all releases GitHub issues GitHub commit activity

This is a simple Aliyun Function Compute (FC) written in Python which fetches the data in JSON format from the Exchange Rate API (go there to get a free key) and uploads it to an Aliyun OSS bucket. It is intended to be used in a custom container-sourced function triggered by a timer, but you can adapt it depeding on your needs.

Notes

  • The config.py file is not provided, as you may already have your own configuration file/system (perhaps even using the enviroment variables of the FC). Just replace the config.config dictionary members with your own cofiguration parameters.
  • A sample Dockerfile in provided, which you might adjust to your use case.
  • A sample requirements.txt file is provided, which you might adjust to your use case.
  • The free API has certain quota, so setup the "cronjob" to be run every hour.
  • Aliyun refers to Alibaba Cloud Services, but this code can be easily adapted to run in AWS Lambda, for instance.
  • I am not affiliated in any way to Exchange-Rate-API. I found their API handy for some of my projects. You should check if their service suits your use case, both technically and legally. Also, I'm not responsible for the quality or fitness of their service. Use it at your own risk ;)

License

Copyright (c) 2023, Rodolfo González González.

Read the LICENSE file.

fc-exchange-rate-update's People

Contributors

rgglez avatar rgonzalez-gnt 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.