> For the complete documentation index, see [llms.txt](https://calnix.gitbook.io/eth-dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://calnix.gitbook.io/eth-dev/archive/brownie-framework/brownie-basics.md).

# Brownie basics

To have brownie deploy the folder structure within a folder:

`brownie init`

### Deploy.py

This file will handle deployment logic. yyIn your deploy.py file, in scripts folder:

```python
# for blockchain deplyment
# brownie run <scriptname.py>

#brownie has an accounts package
from brownie import accounts 

#put all the deployment logic in one function:
def deploy_simple_storage():
    #local ganache accounts
    account = accounts[0]; print(account)

    #use own account for testnet
    #add account to brownie: brownie accounts new <acc_name:freecodecamp-account>


def main():
    deploy_simple_storage()
```

### Accounts management

Brownie has a package called accounts for handling accounts. In terminal:

```bash
brownie accounts new freecodecamp-account
```

Terminal will request for your private key:

![](https://1628544884-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTgomzlmn9NrxUY0OQ3cD%2Fuploads%2FXHh92ExrnXb2DtLeju6E%2Fimage.png?alt=media\&token=5fafd55c-7705-4286-97b1-05aed3d084d2)

Add 0x to the front of the private key before pasting it in. Brownie will password encrypt the private key.

#### accounts list

> &#x20;\> brownie accounts list

![](https://1628544884-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTgomzlmn9NrxUY0OQ3cD%2Fuploads%2FCk9nE07ddkGnSeYQtkXf%2Fimage.png?alt=media\&token=f5e9199c-4ff9-482b-b4b0-1d3585029e81)

this will list all the accounts user has added.

#### delete accounts&#x20;

&#x20;\> brownie accounts delete \<acc\_name>
