semvec/pypi-packages huggingface dataset:
onnc 1.0.0
Api client

# ONNC API Client for python

## Installation
### Manual
```
git clone <git@git.skymizer.com:nnuxe/api-client.git>
cd <api-client>\
pip install -r requirements.txt

```

### Using pip
```
pip install onnc

```


## Documentations
We use Sphinx to generate documentation,
Follow below command to generate html docs.

```
git clone <git@git.skymizer.com:nnuxe/api-client.git>
cd <api-client>\docs
make html
```
The html documents will be generated at `<api-client>\docs\build\html\index.html`


## Example
Here is an example to show how to use ONNC API
```
from onnc.workspace import Workspace

with Workspace() as ws:
    ws.upload_model('./resources/test_model.h5', './resources/samples.npy', input_name='input_1')
    ws.compile(board='NUMAKER_IOT_M487', ram_size=65536)
    ws.download('./loadable.zip')
```

More xamples can be found in [examples](https://git.skymizer.com/nnuxe/api-client/-/tree/master/examples), currently we provide below examples:

1. [Keras MNIST](https://git.skymizer.com/nnuxe/api-client/-/tree/master/examples/keras): Contains a MNIST example in Keras from training to development.
2. [Simple Example](https://git.skymizer.com/nnuxe/api-client/-/tree/master/examples/serialized): Compile a serialized model, and download loadable with demo code in c++.
Brisk-py 0.2.0
A way to create a lightning fast HTTP server using ASGI
Requires Python: >=3.7

# Brisk
*The fast ASGI framework*
___

[Repository](https://github.com/brisk_py/brisk)

### Table of Contents
1. [Usage](#usage)
2. [Documentation](#documentation)

---
### Usage

Install using pip:
`pip install brisk-py`

##### Basic Example:
```python
from brisk_py import brisk
app = brisk.App()

# simple routing
@app.get('/')
def route(request):
    return '<h1>Hello World</h1>'
# render html file
@app.get('/')
def route(request):
    return brisk.html('index.html')

```

##### Create an api
```python
from brisk_py import brisk 
app = brisk.App()

users = {'users': [{'user': 'John Doe', 'age': 34}, {'user': 'Jane Doe', 'age': 37}]}

@app.get('/users')
def route(request):
    return users

@app.get('/user')
def route(request):
    user = request.body.get('user')
    if user:
        return users.get(user, {'message': 'user not found'})
    else:
        return {'message': 'no user provided'}

@app.post('/users')
def route(request):
    user = request.body.get('user')
    age = request.body.get('age')

    if age and user:
        users.append({'user': user, 'age': age})
        return {'message': 'success'}
    else:
        return {'message': 'error'}

```
##### Run Python in HTML
```python
# main.py
from brisk_py import brisk 
app = brisk.App()

@app.get('/')
def route(request):
    fav_things = ['raindrops on roses', 'whiskers on kittens', 'bright copper kettles', 'warm woolen mittens']
    return html('index.html', fav_things=fav_things)

```


---
### Documentation
TBD
bhbotlist.py 0.0.1
a official api from bhbotlist.xyz
Keywords: python,discord,botlist,bhbotlist

# bhbotlist 

Useful library for [bhBotList.xyz](https://www.bhbotlist.xyz)


## Installation
```
pip install bhbotlistpy
```
## Example 
Here is a quick example on how you can update your bots status.
```python
import bhbotlistpy

bot_list = bhbotlistpy.connect("your_bhbl_token")

bot_list.update(bot_id, server_count) # Add your bots data here
```
Run the script and your bots status should be updated. If there was a error there will be a exception. To handle excaption you could do the following:

```python
import bhbotlistpy
from bhbotlistpy import Exceptions

bot_list = bhbotlistpy.connect("your_bhbl_token")

try:
  bot_list.update(bot_id, server_count)
except Exceptions.Forbidden:
  print("You don't have access to update your status, invailid token or wrong bot")
except Exceptions.BotNotFound:
  print("The bot ID was invailed")
except Exception as error:
  print(error)
```

## Get a bots info
With this function you can get all data from a bot

```python
import MotionBotList

bot_list = MotionBotList.connect("your_api_key")

bot = bot_list.get_bot(bot_id)
print(bot.name)
print(bot.owner_id)
```
This function will return a bot object, or None if you don't have a API key. This function will raise the BotNotFound exception if not bot was found

## Get bot votes
Get all users who voted for the bot

```python
import MotionBotList

bot_list = MotionBotList.connect("your_api_key")

votes = bot_list.get_votes(bot_id)

for user in votes:
    print(user.user_name)
    print(user.vote_time)
```
<p>Will return a list with a <code>voteuser</code> object.</p>

## Voting system
A short description on how our voting system works.

<p>Every beginning of a month we reset all votes, if user vote on that day their vote will stay on the bots page until the beggining of the next month. A user can vote once every 12 hours, their vote will be removed from the list and will be replaced with a place holder. This is when we set the <code>is_user</code> to <code>false</code>.</p>

## Author
<p><a href="https://github.com/bhbotlist-xyz" rel="nofollow">BHBotlist</a></p>

<a>Join discord for more</a>

<p><a href="https://www.bhbotlist.xyz/dc" rel="nofollow">discord server</a></p>