rocket-esi-package 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ Metadata-Version: 2.4
2
+ Name: rocket-esi-package
3
+ Version: 0.1.0
4
+ Summary: A simple Python package for rockets
5
+ Author: Student
6
+ Dynamic: author
7
+ Dynamic: summary
@@ -0,0 +1,32 @@
1
+
2
+
3
+ \# Rocket ESI Package
4
+
5
+
6
+
7
+ A simple Python package for working with rockets.
8
+
9
+
10
+
11
+ \## Example
12
+
13
+
14
+
15
+ ```python
16
+
17
+ from rocket import Rocket
18
+
19
+
20
+
21
+ r1 = Rocket(0, 0)
22
+
23
+ r2 = Rocket(3, 4)
24
+
25
+
26
+
27
+ print(r1.get\_distance(r2))
28
+
29
+ ```
30
+
31
+
32
+
@@ -0,0 +1 @@
1
+ from .rocket import Rocket
@@ -0,0 +1,26 @@
1
+
2
+ from math import sqrt
3
+
4
+
5
+ class Rocket:
6
+ def __init__(self, x=0, y=0):
7
+ self.x = x
8
+ self.y = y
9
+
10
+ def move_up(self, x_increment=0, y_increment=1):
11
+ self.x += x_increment
12
+ self.y += y_increment
13
+
14
+ def get_distance(self, other_rocket):
15
+ return sqrt(
16
+ (self.x - other_rocket.x) ** 2
17
+ + (self.y - other_rocket.y) ** 2
18
+ )
19
+
20
+ def __eq__(self, other):
21
+ if not isinstance(other, Rocket):
22
+ return NotImplemented
23
+ return self.x == other.x and self.y == other.y
24
+
25
+ def __str__(self):
26
+ return f"Rocket at ({self.x}, {self.y})"
@@ -0,0 +1,7 @@
1
+ Metadata-Version: 2.4
2
+ Name: rocket-esi-package
3
+ Version: 0.1.0
4
+ Summary: A simple Python package for rockets
5
+ Author: Student
6
+ Dynamic: author
7
+ Dynamic: summary
@@ -0,0 +1,8 @@
1
+ README.md
2
+ setup.py
3
+ rocket/__init__.py
4
+ rocket/rocket.py
5
+ rocket_esi_package.egg-info/PKG-INFO
6
+ rocket_esi_package.egg-info/SOURCES.txt
7
+ rocket_esi_package.egg-info/dependency_links.txt
8
+ rocket_esi_package.egg-info/top_level.txt
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,10 @@
1
+
2
+ from setuptools import setup, find_packages
3
+
4
+ setup(
5
+ name="rocket-esi-package",
6
+ version="0.1.0",
7
+ description="A simple Python package for rockets",
8
+ packages=find_packages(),
9
+ author="Student",
10
+ )