<commit_before>[![Build Status](https://travis-ci.org/richardkiss/pycoin.png?branch=master)](https://travis-ci.org/richardkiss/pycoin)
[![codecov.io](https://codecov.io/github/richardkiss/pycoin/coverage.svg?branch=master)](https://codecov.io/github/richardkiss/pycoin)


pycoin -- Python Cryptocoin Utilities
=====================================

The pycoin library implements many utilities useful when dealing with bitcoin and some bitcoin-like
alt-coins. It has been tested with Python 2.7, 3.6 and 3.7.

See also [pycoinnet](http://github.com/richardkiss/pycoinnet/) for a library that speaks the bitcoin protocol.

Documentation at [readthedocs](http://pycoin.readthedocs.io/en/latest/)

Discussion at [zulipchat](https://pycoin.zulipchat.com/)


Networks
--------

As of 0.9, pycoin supports many coins to various degrees via the "network" class. Since specifications
vary based on the network (for example, bitcoin mainnet addresses start with a "1", but testnet
addresses start with an "m" or "n"), all API descends from a network object. Everything related to a
particular network is scoped under this class.

Bitcoin has the highest level of support, including keys, transactions, validation of signed transactions, and
signing unsigned transactions, including partial signing of multisig transactions. These are in level of
increasing complexity, so features for other coins will likely be supported in that order.

There are two main ways to get a network:

```
from pycoin.symbols.btc import network
```

OR

```
from pycoin.networks.registry import network_for_netcode
network = network_for_netcode("BTC")
```


Keys
----

You can create a private key and get the corresponding address.

```
from pycoin.symbols.btc import network

key = network.keys.private(secret_exponent=1)  # this is a terrible key because it's very guessable
print(key.wif())
print(key.sec())
print(key.address())<commit_msg>Fix readme, network.keys.private() renamed to .wif<commit_after>[![Build Status](https://travis-ci.org/richardkiss/pycoin.png?branch=master)](https://travis-ci.org/richardkiss/pycoin)
[![codecov.io](https://codecov.io/github/richardkiss/pycoin/coverage.svg?branch=master)](https://codecov.io/github/richardkiss/pycoin)


pycoin -- Python Cryptocoin Utilities
=====================================

The pycoin library implements many utilities useful when dealing with bitcoin and some bitcoin-like
alt-coins. It has been tested with Python 2.7, 3.6 and 3.7.

See also [pycoinnet](http://github.com/richardkiss/pycoinnet/) for a library that speaks the bitcoin protocol.

Documentation at [readthedocs](http://pycoin.readthedocs.io/en/latest/)

Discussion at [zulipchat](https://pycoin.zulipchat.com/)


Networks
--------

As of 0.9, pycoin supports many coins to various degrees via the "network" class. Since specifications
vary based on the network (for example, bitcoin mainnet addresses start with a "1", but testnet
addresses start with an "m" or "n"), all API descends from a network object. Everything related to a
particular network is scoped under this class.

Bitcoin has the highest level of support, including keys, transactions, validation of signed transactions, and
signing unsigned transactions, including partial signing of multisig transactions. These are in level of
increasing complexity, so features for other coins will likely be supported in that order.

There are two main ways to get a network:

```
from pycoin.symbols.btc import network
```

OR

```
from pycoin.networks.registry import network_for_netcode
network = network_for_netcode("BTC")
```


Keys
----

You can create a private key and get the corresponding address.

```
from pycoin.symbols.btc import network

key = network.keys.wif(secret_exponent=1)  # this is a terrible key because it's very guessable
print(key.wif())
print(key.sec())
print(key.address())
{'fraction_non_alphanumeric': 0.11914011914011914, 'fraction_numerical': 0.00518000518000518, 'mean_word_length': 5.006220839813375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3643619', 'n_tokens_mistral': 1166, 'n_tokens_neox': 1107, 'n_words': 404}