Skip to main content

A Python library for aggregating token prices and swaps across multiple DEXs

Project description

pyBaseSwap

pyBaseSwap is a Python library designed to facilitate interaction with ERC-20 tokens on the Base L2 Ethereum blockchain. It provides an easy-to-use interface for managing token balances, allowances, and transactions, allowing developers to focus on building their applications without worrying about the complexities of blockchain interactions.

Documentation

Examples

Pypi Realese

Installation

You can install the package using pip:

pip install pyBaseSwap

Installing from Source

If you prefer to install pyBaseSwap from the source, follow these steps:

Clone the repository

git clone https://github.com/BaseTools/pyBaseSwap
cd pyBaseSwap
python setup.py install

EXAMPLE USE

from pyBaseSwap import BaseSwap
BS = BaseSwap() # No Token Addresss Provided fallback to USDC

BS.changeToken(
  "0x65e570b560027F493f2b1907e8e8e3B9546053bD" #Tyler Token
)
usdPrice = BS.getUSDPrice() # fetch usd price

print(usdPrice)

LICENSE

MIT License

Copyright (c) [2024] [BasedTools]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

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

pybaseswap-0.0.2.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

pyBaseSwap-0.0.2-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file pybaseswap-0.0.2.tar.gz.

File metadata

  • Download URL: pybaseswap-0.0.2.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for pybaseswap-0.0.2.tar.gz
Algorithm Hash digest
SHA256 82cd0b7af88d6956ee32717c4b108bea93d2857e7c465728615a5fa45e267ce9
MD5 50146345f6a4cc8432ff11cce829d3e3
BLAKE2b-256 2b63a721fb251cbfa0591127a98e8a8767a60c53b5e63bb57fb29b1058efda3c

See more details on using hashes here.

File details

Details for the file pyBaseSwap-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pyBaseSwap-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for pyBaseSwap-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 debbe75b38a0038f3f8ecb75c836757422d45e3962698b7a81338aa32e1dcebc
MD5 7f114da9188b06477549b9f9c9fc369e
BLAKE2b-256 57edad1daa284a1a9d5c330ed37f2c20d5508d9dac55e1b32e487c9b41c14eb8

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