semvec/pypi-packages huggingface dataset:
bw2data 4.5.4
Tools for the management of inventory databases and impact assessment methods. Part of the Brightway LCA framework.
Requires Python: >=3.9

# bw2data

[![PyPI](https://img.shields.io/pypi/v/bw2data.svg)][pypi status]
[![Status](https://img.shields.io/pypi/status/bw2data.svg)][pypi status]
[![Python Version](https://img.shields.io/pypi/pyversions/bw2data)][pypi status]
[![License](https://img.shields.io/pypi/l/bw2data)][license]

[![Tests](https://github.com/brightway-lca/brightway2-data/actions/workflows/python-test.yml/badge.svg)][tests]
[![Codecov](https://codecov.io/gh/brightway-lca/bw2data/branch/main/graph/badge.svg)][codecov]

[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)][pre-commit]
[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)][black]

[pypi status]: https://pypi.org/project/bw2data/
[read the docs]: https://bw2data.readthedocs.io/
[tests]: https://github.com/brightway-lca/brightway2-data/actions?workflow=Tests
[codecov]: https://app.codecov.io/gh/brightway-lca/bw2data
[pre-commit]: https://github.com/pre-commit/pre-commit
[black]: https://github.com/psf/black

This package provides tools for the management of inventory databases and impact assessment methods.
It is part of the [Brightway LCA framework](https://brightway.dev).
[Online documentation](https://docs.brightway.dev/) is available, and the source code is hosted on [GitHub brightway-lca organization](https://github.com/brightway-lca/brightway2-data).

Note that version 4.0 and higher are only compatible with Brightway 2.5, as described in the [changelog](https://github.com/brightway-lca/brightway2-data/blob/main/CHANGES.md).

## Installation

You can install _bw2data_ via [pip] from [PyPI]:

```console
$ pip install bw2data
```

## Contributing

Contributions are very welcome.
To learn more, see the [Contributor Guide][Contributor Guide].

## License

Distributed under the terms of the [BSD 3 Clause license][License],
_bw2data_ is free and open source software.

## Issues

If you encounter any problems,
please [file an issue][Issue Tracker] along with a detailed description.


<!-- github-only -->

[command-line reference]: https://bw2data.readthedocs.io/en/latest/usage.html
[License]: https://github.com/brightway-lca/bw2data/blob/main/LICENSE
[Contributor Guide]: https://github.com/brightway-lca/bw2data/blob/main/CONTRIBUTING.md
[Issue Tracker]: https://github.com/brightway-lca/bw2data/issues


## Building the Documentation

You can build the documentation locally by installing the documentation Conda environment:

```bash
conda env create -f docs/environment.yml
```

activating the environment

```bash
conda activate sphinx_bw2data
```

and [running the build command](https://www.sphinx-doc.org/en/master/man/sphinx-build.html#sphinx-build):

```bash
sphinx-build docs _build/html --builder=html --jobs=auto --write-all; open _build/html/index.html
```
fastmysql 0.3.7
make it easy to use pymysql

# fastmysql
![](https://img.shields.io/badge/Python-3.8.6-green.svg)

#### 介绍
简单快速的使用mysql

#### 软件架构
软件架构说明


#### 安装教程

1.  pip安装
```shell script
pip3 install fastmysql
```
2.  pip安装（使用淘宝镜像加速）
```shell script
pip3 install fastmysql -i https://mirrors.aliyun.com/pypi/simple
```

#### 使用说明

1.  demo
```python
import fastmysql
query_res = fastmysql.query_table_all_data(
    db_name='test', 
    tb_name='test'
)

# 获取建表语句
res = fastmysql.show_create_table(
    db_name='test',
    tb_name='test'
)
```

2.  防止sql注入：
写法

cursor.execute('insert into user (name,password) value (?,?)',(name,password))
　　或者

cursor.execute('insert into user (name,password) value (%s,%s)',(name,password))
　　%s与?都可以作为sql语句的占位符，它们作为占位符的功能是没有区别的，mysql.connector用 %s 作为占位符；pymysql用 ? 作为占位符。但是注意不要写成

cursor.execute('insert into user (name,password) value (?,?)'%(name,password))
　　这种写法是直接将参数拼接到sql语句中，这样数据库就容易被sql注入攻击，比如

cursor.execute('select * from user where user=%s and password=%s'%(name,password))
　　要是name和password都等于'a or 1=1'，那么这个语句会把整个user表都查询出来

3.  默认环境
- 默认使用的环境文件为：mysql.env