{"id":26644971,"url":"https://github.com/dhruvv1402/blockchain-python","last_synced_at":"2025-08-22T10:40:22.103Z","repository":{"id":284055220,"uuid":"953673022","full_name":"dhruvv1402/Blockchain-Python","owner":"dhruvv1402","description":"A Python-powered blockchain project featuring a basic implementation for learning and an advanced version with enhanced security, smart contracts, and peer-to-peer networking. ","archived":false,"fork":false,"pushed_at":"2025-03-23T22:04:39.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T23:18:12.330Z","etag":null,"topics":["blockchain","decentralization","flask","hashlib","json","python","requests","rest-api","smart-contracts"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dhruvv1402.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-23T21:57:14.000Z","updated_at":"2025-03-23T22:07:53.000Z","dependencies_parsed_at":"2025-03-23T23:18:16.493Z","dependency_job_id":"74dfb1ab-08b0-454c-b6e6-1210a4249c74","html_url":"https://github.com/dhruvv1402/Blockchain-Python","commit_stats":null,"previous_names":["dhruvv1402/blockchain-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruvv1402%2FBlockchain-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruvv1402%2FBlockchain-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruvv1402%2FBlockchain-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhruvv1402%2FBlockchain-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhruvv1402","download_url":"https://codeload.github.com/dhruvv1402/Blockchain-Python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245352287,"owners_count":20601122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","decentralization","flask","hashlib","json","python","requests","rest-api","smart-contracts"],"created_at":"2025-03-24T21:21:10.274Z","updated_at":"2025-03-24T21:21:11.167Z","avatar_url":"https://github.com/dhruvv1402.png","language":"Python","readme":"# Blockchain-Python\n\n![Blockchain](https://img.shields.io/badge/Blockchain-Python-blue)\n\nThis repository contains two implementations of a blockchain in Python:\n1. **Basic Blockchain** - A simple blockchain demonstrating fundamental concepts.\n2. **Advanced Blockchain** - An enhanced version with additional features and improvements.\n\n## 🚀 Features\n### Basic Blockchain\n- Create a blockchain from scratch\n- Implement proof-of-work (PoW) mechanism\n- Validate transactions and chain integrity\n- Simple Flask-based API for interaction\n- Mine new blocks and add transactions\n\n### Advanced Blockchain\n- Smart contract support\n- Improved consensus mechanism\n- Enhanced security and validation\n- Decentralized peer-to-peer communication\n\n## 🛠️ Installation\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/dhruvv1402/Blockchain-Python.git\n   cd Blockchain-Python\n   ```\n\n2. **Create a virtual environment (optional but recommended)**\n   ```bash\n   python -m venv venv\n   source venv/bin/activate  # On macOS/Linux\n   venv\\Scripts\\activate     # On Windows\n   ```\n\n3. **Install dependencies**\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n## 🚀 Usage\n\n### 1️⃣ Running the Basic Blockchain\n```bash\ncd basic_blockchain\npython basicchain.py\n```\nBy default, it runs on `http://127.0.0.1:5000/`\n\n### 2️⃣ Running the Advanced Blockchain\n```bash\ncd advanced_blockchain\npython advancedchain.py\n```\n\n### 3️⃣ Available API Endpoints (Basic \u0026 Advanced)\n\n- **Mine a new block**  \n  ```\n  GET /mine\n  ```\n  Mines a new block and adds it to the blockchain.\n\n- **Get the full blockchain**  \n  ```\n  GET /chain\n  ```\n  Returns the entire blockchain in JSON format.\n\n- **Add a new transaction**  \n  ```\n  POST /transactions/new\n  ```\n  Adds a new transaction to the next block.\n  ```json\n  {\n      \"sender\": \"Alice\",\n      \"recipient\": \"Bob\",\n      \"amount\": 10\n  }\n  ```\n\n## 🏗️ Project Structure\n```\nBlockchain-Python/\n│-- basic_blockchain/       # Basic blockchain implementation\n│   │-- basicchain.py       # Main basic blockchain logic\n│-- advanced_blockchain/    # Advanced blockchain implementation\n│   │-- advancedchain.py    # Advanced blockchain logic\n│-- requirements.txt        # Required dependencies\n│-- README.md               # Project documentation\n```\n\n## 🤝 Contributing\n1. Fork the repository\n2. Create a new branch (`git checkout -b feature-branch`)\n3. Commit your changes (`git commit -m 'Add new feature'`)\n4. Push to your branch (`git push origin feature-branch`)\n5. Open a Pull Request\n\n## 📜 License\nThis project is licensed under the MIT License.\n\n---\n\nFeel free to improve and expand this project! Happy coding! 🚀\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhruvv1402%2Fblockchain-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhruvv1402%2Fblockchain-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhruvv1402%2Fblockchain-python/lists"}