Skip to main content

This is a API wrapper for NEPSE API.

Project description

NEPSE API Wrapper

This python module fetches the data from Nepali Stock Site and provides them in a pythonic and usable way.

About

This is a API wrapper for NEPSE API. This project was inspired from PyPi Nepse.

How to use?

You can use this by package from Nepse API PyPi

pip install nepse-api

Why use this?

How is this better than PyPi Nepse?

  • It is asynchronous.
  • Data can be taken as attributes rather than from dict.
  • Data is fetched from the API rather than scraping the site.
  • Data is cached

APIs used

The APIs that I used to create this API wrapper is:

How to use?

import asyncio
from nepse import Client

async def main():
    # Initializes the client
    client = Client()

    # Gets the data
    data = await client.security_client.get_company(symbol="UPPER")

    # Prints the highest price for that company today
    print(data.security_daily_trade_dto.high_price)

    # Properly closes the session
    await client.close()
    
# Run the function
loop = asyncio.get_event_loop()
loop.run_until_complete(main())

Why are the attributes so in-costistent?

The attribues are in-consistent because the attributes are set according to the response set by the API. I tried changing it up but that would be distruptive because the comability with the API would be broken.

Documentation?

Documentation is still in progress!

Want To Contribute?

You can send a pull request or open an issue to contribute.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nepse-api-0.5.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

nepse_api-0.5.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file nepse-api-0.5.0.tar.gz.

File metadata

  • Download URL: nepse-api-0.5.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.5 Linux/5.12.6-arch1-1

File hashes

Hashes for nepse-api-0.5.0.tar.gz
Algorithm Hash digest
SHA256 067f59130755f2273a4417ad4f40afcb1e074c3b0c7f95ad1a3299afc2be51a3
MD5 248b247cfee64992597e3349f53b7729
BLAKE2b-256 f2cf831e7ec31770bdd664133b7a79b000a81a4e06b5fbad629ebce9d4887516

See more details on using hashes here.

File details

Details for the file nepse_api-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: nepse_api-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.5 Linux/5.12.6-arch1-1

File hashes

Hashes for nepse_api-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dad628ba332d10b22db291d4e8dbf04dfd90b616c1dbce5b99a9c3a81dd5ac78
MD5 0d6785887722d8d83276b8ec95ccb2da
BLAKE2b-256 8b98f429590f65fa55fa42cb9a47a5d3c2889bc776cfb9c03fd1fec1f2786a97

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page