GithubHelp home page GithubHelp logo

isabella232 / sonic-py-swsssdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sonic-net/sonic-py-swsssdk

0.0 0.0 0.0 126 KB

Python SONiC switch state service sdk

License: Other

Python 100.00%

sonic-py-swsssdk's Introduction

Total alerts Language grade: Python

Python SwSS SDK

Python utility library for SONiC Switch State Service database access

See the SONiC Website for more information about the SONiC project

Database names are defined by Switch State Service. See the sonic-swss-common project.

Example Usage

>>> import swsssdk
>>> swss = swsssdk.SonicV2Connector()
>>> swss.db_list
dict_keys(['COUNTERS_DB', 'ASIC_DB', 'APPL_DB'])
>>> dir(swss)
['APPL_DB', 'ASIC_DB', 'CONNECT_RETRY_WAIT_TIME', 'COUNTERS_DB', 'DATA_RETRIEVAL_WAIT_TIME', 'KEYSPACE_EVENTS', 'KEYSPACE_PATTERN', 'PUB_SUB_MAXIMUM_DATA_WAIT', 'PUB_SUB_NOTIFICATION_TIMEOUT', 'REDIS_HOST', 'REDIS_PORT', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_connection_error_handler', '_onetime_connect', '_persistent_connect', '_subscribe_keyspace_notification', '_unavailable_data_handler', 'close', 'connect', 'db_list', 'db_map', 'get', 'get_all', 'get_dbid', 'get_redis_client', 'keys', 'keyspace_notification_channels', 'redis_clients', 'set']
>>> swss.connect(swss.APPL_DB)
>>> swss.keys(swss.APPL_DB)
[b'PORT_TABLE:Ethernet8', b'INTF_TABLE:Ethernet16:10.0.0.8/31', b'LLDP_ENTRY_TABLE:Ethernet4', b'PORT_TABLE:Ethernet76', b'PORT_TABLE_VALUE_QUEUE', b'NEIGH_TABLE:eth0:10.3.147.40', ...]

sonic-py-swsssdk's People

Contributors

anilkpandey avatar daall avatar dmytroxshevchuk avatar dplore avatar dzhangalibaba avatar jleveque avatar judyjoseph avatar keboliu avatar lguohan avatar liuqu avatar madhupalu avatar marian-pritsak avatar mykolaf avatar oleksandrivantsiv avatar pavel-shirshov avatar praveen-li avatar prsunny avatar qiluo-msft avatar rajendra-dendukuri avatar renukamanavalan avatar stcheng avatar stepanblyschak avatar suvarnameenakshi avatar tahmed-dev avatar taoyl-ms 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.