πŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more β†’
Socket
Book a DemoInstallSign in
Socket

pyeugene

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pyeugene

Eugene Investment & Securities Champion Open Api Python Wrapper

1.0.1
PyPI
Maintainers
1

pyEugene πŸ“ˆ

Publish to Pypi PyPI version Downloads Hits

Eugene Investment & Securities Champion Open Api Python Wrapper

Free software: MIT

Demo

Demo

Prerequisites πŸ‘“

  • Python 3.9.*
  • 32 Bit Development environment
  • Eugene Web Account (need Eugene securities account)

Introduction πŸ’»

pyEugene is an unofficial python wrapper for easy use of the Champion Open API provided by Eugene Investment & Securities.

Even if you are not familiar with the functions below, you can use all of them.

  • The API structure of OCX provided by Eugene Investment & Securities
  • Operating Structure of the Version Processing Program Provided by Eugene Investment & Securities
  • Use dynamicCall function for function invocation in con>

ν•œκ΅­μ–΄ μ†Œκ°œ πŸ’»
pyEugene은 μœ μ§„νˆ¬μžμ¦κΆŒμ—μ„œ μ œκ³΅ν•˜λŠ” Champion Open APIλ₯Ό μ‰½κ²Œ μ‚¬μš©ν•˜κΈ° μœ„ν•œ 비곡식 python wrapperμž…λ‹ˆλ‹€.

μ•„λž˜μ˜ κΈ°λŠ₯듀을 잘 λͺ¨λ₯΄λ”라도 μΆ©λΆ„νžˆ λͺ¨λ“  κΈ°λŠ₯을 μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

  • μœ μ§„νˆ¬μžμ¦κΆŒμ—μ„œ μ œκ³΅ν•˜λŠ” OCX의 API ꡬ쑰
  • μœ μ§„νˆ¬μžμ¦κΆŒμ—μ„œ μ œκ³΅ν•˜λŠ” λ²„μ „μ²˜λ¦¬ ν”„λ‘œκ·Έλž¨μ˜ μž‘λ™ ꡬ쑰
  • μ»¨νŠΈλ‘€μ—μ„œ ν•¨μˆ˜ ν˜ΈμΆœμ„ μœ„ν•œ dynamicCall ν•¨μˆ˜ μ‚¬μš©

Getting Started πŸš€

To begin using pyEugene, start by installing anaconda(or you can use miniconda):

Download anaconda Download miniconda

When you're done installing the anaconda, run the anaconda prompt and set it to a 32-bit development environment

set CONDA_FORCE_32BIT=1

If you replace the anaconda with 32-bit, create a 32-bit virtual environment (You should use Python 3.9 version)

conda create --name py39_32 python=3.9

When you're done installing, activate virtual environment and use the pip to install pyEugene

conda activate py39_32
pip install pyeugene

Once you've installed pyEugene, you can start using it right away. For example, to get real-time stock price using pyEugene, enter the following code:

import sys
import os
from pprint import pprint
from dotenv import load_dotenv
from pyeugene.eugene_manager import EugeneManager

if __name__ == "__main__":
    load_dotenv()
    em = EugeneManager(os.getenv("USER_ID"), os.getenv("USER_PW"), os.getenv("CERT_PW"))

    real_cmd = {
        'realId': '21',
        'realKey': '005930',
        'output': ["SCODE", "SNAME", "CMARKETGUBUN", "LTIME", "CPCHECK", "LDIFF", "LCPRICE"]
    }

    em.put_real(real_cmd)
    for i in range(10):
        data = em.get_real()
        pprint(data)
    sys.exit()

ν•œκ΅­μ–΄ μ‚¬μš© κ°€μ΄λ“œ πŸš€

pyEugene을 μ‚¬μš©ν•˜κΈ° μœ„ν•΄μ„œλŠ” μ•„λ‚˜μ½˜λ‹€λ₯Ό μ„€μΉ˜ν•΄μ•Ό ν•©λ‹ˆλ‹€(λ―Έλ‹ˆμ½˜λ‹€λ₯Ό μ„€μΉ˜ν•΄ μ‚¬μš©ν•  μˆ˜λ„ μžˆμŠ΅λ‹ˆλ‹€)

μ•„λ‚˜μ½˜λ‹€ λ‹€μš΄λ‘œλ“œ λ―Έλ‹ˆμ½˜λ‹€ λ‹€μš΄λ‘œλ“œ

μ•„λ‚˜μ½˜λ‹€ λ‹€μš΄λ‘œλ“œκ°€ μ™„λ£Œ λ˜μ—ˆμœΌλ©΄ μ•„λ‚˜μ½˜λ‹€ ν”„λ‘¬ν”„νŠΈλ₯Ό μ‹€ν–‰ν•΄ 32bit κ°œλ°œν™˜κ²½μœΌλ‘œ μ„€μ •ν•΄μ€˜μ•Ό ν•©λ‹ˆλ‹€

set CONDA_FORCE_32BIT=1

32bit둜 섀정이 μ™„λ£Œ λ˜μ—ˆμœΌλ©΄ 32bit 가상 개발 ν™˜κ²½μ„ λ§Œλ“€μ–΄μ€λ‹ˆλ‹€ (파이썬 3.9 버전을 μ‚¬μš©ν•΄μ•Ό ν•©λ‹ˆλ‹€)

conda create --name py39_32 python=3.9

μ„€μΉ˜κ°€ λͺ¨λ‘ λλ‚˜λ©΄ κ°€μƒν™˜κ²½μ„ μ‹€ν–‰ν•˜κ³  pipλ₯Ό 톡해 pyEugene을 μ„€μΉ˜ν•΄μ€λ‹ˆλ‹€

conda activate py39_32
pip install pyeugene

λ‹€μŒλΆ€ν„°λŠ” pyEugene을 μ„€μΉ˜ν•˜μ§€ μ•Šκ³ λ„ κΈ°λŠ₯을 μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€. κ°„λ‹¨ν•œ μ˜ˆμ‹œλ‘œ pyEugene을 μ΄μš©ν•΄ μ‹€μ‹œκ°„ μ‹œμ„Έλ₯Ό λ°›μ•„μ˜€λ €λ©΄ μ•„λž˜ μ½”λ“œλ₯Ό μ‚¬μš©ν•˜λ©΄ λ©λ‹ˆλ‹€

import sys
import os
from pprint import pprint
from dotenv import load_dotenv
from pyeugene.eugene_manager import EugeneManager

if __name__ == "__main__":
    load_dotenv()
    em = EugeneManager(os.getenv("USER_ID"), os.getenv("USER_PW"), os.getenv("CERT_PW"))

    real_cmd = {
        'realId': '21',
        'realKey': '005930',
        'output': ["SCODE", "SNAME", "CMARKETGUBUN", "LTIME", "CPCHECK", "LDIFF", "LCPRICE"]
    }

    em.put_real(real_cmd)
    for i in range(10):
        data = em.get_real()
        pprint(data)
    sys.exit()

Contributions πŸ’¬

Feel free to contribute to pyEugene fixing bugs.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts