Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

magic-eden-py

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

magic-eden-py

Python wrap for api solana NFT marketplace MagicEden

  • 0.0.9
  • PyPI
  • Socket score

Maintainers
1

Python wrap for api solana NFT marketplace MagicEden

pip install magic-eden-py

Api classes have methods corresponded to endpoints from official docs

How to use?

  1. Import api class
  2. Create class instance
  3. Use methods of class

Important

Method ended with _dirty its clear answer from marketplace
Other methods, contain processed data and correspond to type annotations

Constructor of api class parameters

environment:

  • description: Define environment for api (api-devnet.magiceden.dev, api-mainnet.magiceden.dev)
  • values: 'MAINNET' | 'DEVNET'
  • default: 'MAINNET'

request_kwargs:

  • description: For make requests used python requests package, its parameter for add additional kwargs to requests
  • values: dict
  • default: {'headers': {'ME-Pub-API-Metadata': '{"paging":true}'}}
>>> wallet_api = MagicEdenWalletsApi(
        environment = 'DEVNENT'
        requests_kwargs: dict = None
      )

Also api class instance have request attribute with last request instance

Example

>>> from magic_eden.api import MagicEdenCollectionsApi

>>> magic_eden_api = MagicEdenCollectionsApi()

>>> collections = magic_eden_api.collections()

>>> magic_eden_api.request   
<Response [200]>

You can also import types for annotation

>>> from magic_eden.api.utils.types import MECollectionInfo
>>> from typings import List

>>> collections: List[MECollectionInfo] = []

Official MagicEden api python wrapper classes

>>> from magic_eden.api import (
  MagicEdenTokensApi, 
  MagicEdenWalletsApi, 
  MagicEdenCollectionsApi, 
  MagicEdenLaunchpadApi
)  

python setup.py sdist twine upload dist/*

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc