3030<img src =" https://img.shields.io/github/languages/top/Aviksaikat/swarm-cid-py?style=for-the-badge&color=DEDE17 " alt =" GitHub top language " />
3131</div >
3232
33- ______________________________________________________________________
33+ ---
3434
3535## 📖 Table of Contents
3636
@@ -43,15 +43,15 @@ ______________________________________________________________________
4343- [ 🤝 Contributing] ( #-contributing )
4444- [ 📄 License] ( #-license )
4545
46- ______________________________________________________________________
46+ ---
4747
4848## 📍 Api
4949
5050Utility library written in Python to convert Swarm hex references into Swarm CIDs.
5151
5252The swarm-cid library provides the following functions:
5353
54- ` encodeReference (reference, type, version)`
54+ ` encode_reference (reference, type, version)`
5555
5656Encodes a reference string into a CID.
5757
@@ -60,7 +60,7 @@ Encodes a reference string into a CID.
6060- version: The version of the CID (either 1 or 2).
6161 Returns a CID string.
6262
63- ` decodeCid (cid)`
63+ ` decode_cid (cid)`
6464
6565Decodes a CID string into a dictionary containing information about the underlying data.
6666
@@ -72,34 +72,34 @@ following keys:
7272- reference: The reference string extracted from the CID.
7373- type: The type of the reference (either ReferenceType.MANIFEST or ReferenceType.FEED).
7474
75- ` decodeFeedCid (cid)`
75+ ` decode_feed_cid (cid)`
7676
7777Decodes a CID string into a feed reference string.
7878
7979- cid: The CID string to decode.
8080 Returns a feed reference string.
8181
82- ` decodeManifestCid (cid)`
82+ ` decode_manifest_cid (cid)`
8383
8484Decodes a CID string into a manifest reference string.
8585
8686- cid: The CID string to decode.
8787 Returns a manifest reference string.
8888
89- ` encodeFeedReference (reference)`
89+ ` encode_feed_reference (reference)`
9090
9191Encodes a feed reference string into a CID.
9292
9393- reference: The feed reference string to encode.
9494 Returns a CID string.
9595
96- ` encodeManifestReference (reference)`
96+ ` encode_manifest_reference (reference)`
9797
9898Encodes a manifest reference string into a CID.
9999
100100- reference: The manifest reference string to encode.
101101
102- ______________________________________________________________________
102+ ---
103103
104104## 🚀 Getting Started
105105
@@ -109,39 +109,39 @@ ______________________________________________________________________
109109py- multiformats- cid
110110```
111111
112- ______________________________________________________________________
112+ ---
113113
114114### 🔧 Installation
115115
116116``` sh
117117pip install swarm_cid_py
118118```
119119
120- ______________________________________________________________________
120+ ---
121121
122122### 🤖 Running swarm-cid-py
123123
124124``` py
125- >> > from swarm_cid import encodeReference, decodeCid
125+ >> > from swarm_cid import encode_reference, decode_cid
126126>> > reference = " 4c949794d617238d928ef1dc544ee07cbdcfd6b946e5202fa06c4d32088d7e69"
127- >> > cid = encodeReference (reference, ReferenceType.MANIFEST , 1 )
127+ >> > cid = encode_reference (reference, ReferenceType.MANIFEST , 1 )
128128>> > print (str (cid))
129129bah5acgzajskjpfgwc4ry3euo6hofitxaps647vvzi3ssal5anrgtecenpzuq
130- >> > decoded_cid = decodeCid (cid)
130+ >> > decoded_cid = decode_cid (cid)
131131>> > print (decoded_cid.to_dict())
132132{' reference' :
133133' 4c949794d617238d928ef1dc544ee07cbdcfd6b946e5202fa06c4d32088d7e69' , ' type' : ' manifest' }
134134```
135135
136- ______________________________________________________________________
136+ ---
137137
138138### 🧪 Tests
139139
140140``` sh
141141pytest tests/test_swarm_cid.py
142142```
143143
144- ______________________________________________________________________
144+ ---
145145
146146## 🤝 Contributing
147147
@@ -180,12 +180,12 @@ Once your PR is reviewed and approved, it will be merged into the main branch.
180180
181181</details >
182182
183- ______________________________________________________________________
183+ ---
184184
185185## 📄 License
186186
187187This project is protected under the [ BSD-3-Clause] ( ./LICENSE ) License.
188188
189189[ ** Return** ] ( #Top )
190190
191- ______________________________________________________________________
191+ ---
0 commit comments